a little help
Posted: 12 September 2006 07:21 PM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2006-09-12

i was working on this the other day…http://ttimelive.jlmoon.com/...and i had a few problems with it in ie. it doesnt center like its supposed to and the top margin is off by about 20px. i know its probably something simple, but im in a rut and its not coming to me. help?

Profile
 
 
Posted: 16 September 2006 02:25 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  3
Joined  2006-09-07

Hi jmuniz,

If you ‘text-align:center’ your body element and then overwrite this in your all div ‘text-align: left;’ your page will be centered. I tested this in IE & Firefox.

CSS Changes:

/* Center the body HTML element */
body
{
background-image: url(‘thebackground.png’);
background-repeat: repeat-x;
text-align: center;
}

You already had the all div, configured:

#all
{
width:760px;
margin: 0 auto;
text-align:left;
}

To get around the extra pixels\alignment issue you can add the following:

/* Reduce the top of the BG area by .01em */
#bg
{
position: absolute;
width: 760px;
height: 600px;
margin: 0;
top: -.01em;
background-image:  url(‘ttimelive.png’);
background-repeat: no-repeat;
}

Note changing this affects the position of your links, you have to reposition these too (I reduced the top margin by 10px):

/* Reposition your links */
#links
{
position: absolute;
width: 350px;
height: 35px;
margin: 140px 0px 0px 20px;
font-family: georgia;
font-size: 16px;
text-transform: capitalize;
}

Again I tested this change in IE & Firefox, without any issues. Check your spelling too, see the link ‘Rresources’!

Enjoy!

Profile