Log In · Register

 
centering a div layout (firefox vs. internet explorer), centering a div layout (firefox vs. internet explorer)
sensime3na
post Nov 30 2007, 12:05 AM
Post #1


Newbie
*

Group: Member
Posts: 8
Joined: Nov 2006
Member No: 482,912



Okay I'm having trouble centering a profile layout I'm doing on myspace. This is the cod I have currently on one of my divs:

CODE
.box1 {background-color:000000;
background-image:url('http://i191.photobucket.com/albums/z30/shamrockmartialarts/themmastars.jpg');
background-repeat: no-repeat;

width: 750px;
height: 217px;
z-index:5;
top:130;
left:50px;
position:absolute;
visibility:visible !important;
overflow:hidden; border:0px solid white}


It doesn't really center it in the page, but when I follow something I found on Createblog.com, like this:

CODE
.box1 {background-color:000000;
background-image:url('http://i191.photobucket.com/albums/z30/shamrockmartialarts/themmastars.jpg');
background-repeat: no-repeat;

width: 750px;
height: 217px;
z-index:5;
top:130;
left:-375px;
margin-left: 50%;
position:absolute;
visibility:visible !important;
overflow:hidden; border:0px solid white}


It will center it perfectly in Firefox / Netscape, but when I try to view the page in Internet explorer it makes my image jump way far too the left, and doesn't center it.

Is this just one of those glitches with the differences between firefox and internet explorer? Or am I just coding it wrong?

I searched all through the scripts and tutorials, as well as all over the web--- can anyone help?

It would be wonderful....

Thanks,
Gemm
 
 
Start new topic
Replies
MissHygienic
post Nov 30 2007, 12:15 AM
Post #2


Resource Center Tyrant
******

Group: Official Member
Posts: 2,263
Joined: Nov 2007
Member No: 593,306



Are you one of those people who have to make it look perfect in all browsers available to the internet? If you are, I feel you because I am one of them.

I don't know what your site looks like, but I would keep playing with the margins and numbers until it looks good in IE. Maybe if you changed your margins to 100 percent instead and put "!important" in the back of everything.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: