Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
ruaduck
ruaduck
Seems like some of the templates have changed. I was just wondering how to modify the header on them. With all the floats and relative positions i cannot figure out how to get my header and my footers to be center so that when i put something in them, they are automattically centered.
 
Header, want the navigation menu to center along with the logo.
 
Footer, i have banners that auto go left when i add them to the footer.
 
ScottNL
ScottNL
Make sure that the margin is set to auto in the body class of your css sheet.
 
example
 
 
body{
margin: auto;
}
 
ruaduck
ruaduck
But how does that center the header or footer? I see that it auto adjusts the margins of the page depending on what shows up on the page, but how to i make it so i can center the header or footer?
 
ScottNL
ScottNL
margin:auto; will center the container but not the content within.
 
The simple way is to open your html template and add
<center>
 
your content
 
</center>
 
this will center everything within
 
if you want more control make your template as a table
 
<table>
<tr>
<td valign="top" align="center">
your content
</td>
</tr>
<table>
 
Here the content will be centred at the top.
 
if you wish to use css find the container class.
 
<div class="headermain">
<p>your content</p>
<img src="image url" alt="" title=""/>
</div>
 
.headermain p{
text-align: left;
}
 
.headermain img{
display:block;
margin: auto;
text-align: center;
}
 
i put text align in the img class, this is for older versions of IE.
 
Good luck
Last modified: 4 Feb 2011 9:20 AM
 
dmaui
dmaui
Within these css classes,
.contentStyle
.headerStyle
.footerStyle
 
set the following:
width: 999px; (or whatever width you want)
margin: auto;
 
That should do it.
 
Using the <center> tag or tables is not standards compliant, so I wouldn't recommend it.
 
Sara
Sara
This Modification requires MySQL 4.1 or higher - it does not work with MySQL 4.0!
If you use MySQL 4.1 series, MySQL 4.1.10 or higher is required
If you use MySQL 5.0 series, MySQL 5.0.3 or higher is required
 
 
http://www.templatemagician.com/
 
 
 
 
Last modified: 12 Apr 2011 7:54 AM