Advertisement:

Centering Issues

Aloittaja simpleTVT, heinäkuu 10, 2007, 02:49:44 AP

« edellinen - seuraava »

simpleTVT

The Problem

How can i center the banner at the top of the page.

Forums:http://cutemachines.com/forums/


#MRHeader {
   background-image:  url(images/head_bg.gif);
    {
    text-align:center;
    margin-top:0px;
    margin-bottom:0px;
    padding:0px;
    }


Im guessing the code is incorrect, as its not actually centering the banner.

Rudolf

It is centered in Firefox, but that piece of code is not correct
Koodi (Try this) [Valitse]

#MRHeader {
   background-image:  url(images/head_bg.gif);
   text-align:center;
   margin-top:0px;
   margin-bottom:0px;
   padding:0px;
}
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

simpleTVT

Ok i did change that code. But in I.E it is not centered.

Rudolf

Koodi (Search) [Valitse]
<div id="MRHeader">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="650" valign="top" height="110" align="middle">
<a href="http://cutemachines.com/forums/index.php">
<img width="780" height="110" title="Cute Machines Logo" alt="Cute Machines Logo" src="http://cutemachines.com/forums/Themes/PSPTheme_Fixed/images/logo.gif"/>
</a>
</td>
</tr>
</tbody>
</table>
</div>


You'll see align="middle" which should be align="center". Or simply remove it.


I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

simpleTVT

#4
I have changed the "middle" to "center" but still no change.


Firefox is aligned center.

I.E is still aligned to left.

dolator

maybe you just need to empty your cache?

simpleTVT

I have empted cache, but still not change. Im stumped.

Rudolf

#7
You have two tables nested, or so it appears. The tables are not needed anyway.
You need to have something like this:

<div id="MRHeader">
<a href="http://cutemachines.com/forums/index.php"><img src="http://cutemachines.com/forums/Themes/PSPTheme_Fixed/images/logo.gif" width="780" height="110" alt="Cute Machines Logo" title="Cute Machines Logo" /></a>
</div>


Use the style

#MRHeader {
   background-image:  url(images/head_bg.gif);
   text-align:center;
   margin-top:0px;
   margin-bottom:0px;
   padding:0px;
}


For reference, the reason it wasn't centered in IE is that the wrapper table cell had a width of 760px defined. This forced IE to don't take the whole screen for the cell, so the resulting image was centered in that 760px.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

simpleTVT

#8
<div id="MRHeader">
<a href="http://cutemachines.com/forums/index.php"><img src="http://cutemachines.com/forums/Themes/PSPTheme_Fixed/images/logo.gif" width="780" height="110" alt="Cute Machines Logo" title="Cute Machines Logo" /></a>
</div>

When i replace the code with this is get: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in index.template.php on line 220

Any ideas



Advertisement: