centering a div layout (firefox vs. internet explorer), centering a div layout (firefox vs. internet explorer) |
![]() ![]() |
centering a div layout (firefox vs. internet explorer), centering a div layout (firefox vs. internet explorer) |
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 |
|
|
|
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. |
|
|
|
Nov 30 2007, 12:20 AM
Post
#3
|
|
![]() Newbie ![]() Group: Member Posts: 8 Joined: Nov 2006 Member No: 482,912 |
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. Thanks! Haha, yeah I am one of those people. Plus, it's for a business purpose not a personal purpose, so I wanted to make it look professional and streamlined. Hmm, I keep playing around with it and just gets me frustrated. ;/ But thanks for the input. |
|
|
|
Nov 30 2007, 05:11 AM
Post
#4
|
|
![]() Cornflakes :D ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 4,541 Joined: Dec 2005 Member No: 322,923 |
Ah I'm one of those people that has to have everything exactly perfect and I ask a million people if its centered xD
But yea when you make divs code them like this: Properties: CODE <Style> .Test{ border:0px solid; border-color:none; width:760px; height:770px; overflow:auto; position:absolute; left:50%; top:0%; margin-left:-390px; margin-top:100px; text-align:center; visibility:visible;} </style> Then the Div: CODE <div class="test"> CONTENT FOR DIV </div> If you need it explained at all feel free to ask. Also one thing about myspace and centering divs..just center it by the ad. Make sure there is the same amount of pixels on both sides. If you don't know how to do that, if your using firefox use the measureit extension.. Download that here: https://addons.mozilla.org/en-US/firefox/addon/539 Its a really nifty convenient tool to have |
|
|
|
Nov 30 2007, 11:59 AM
Post
#5
|
|
![]() Newbie ![]() Group: Member Posts: 8 Joined: Nov 2006 Member No: 482,912 |
Also one thing about myspace and centering divs..just center it by the ad. Make sure there is the same amount of pixels on both sides. If you don't know how to do that, if your using firefox use the measureit extension.. Download that here: https://addons.mozilla.org/en-US/firefox/addon/539 Its a really nifty convenient tool to have thanks. yeah i tried making sure that there are the same amount of pixels on both sides. it's just when i maximize and de-maximize my browser, the center changes. I want my layout to change with it? does that make sense? hmm, if you go to: myspace.com/mmastars you might see what i mean. thanks for the tips though. -gemm |
|
|
|
Nov 30 2007, 03:27 PM
Post
#6
|
|
![]() Cornflakes :D ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 4,541 Joined: Dec 2005 Member No: 322,923 |
Well it stays centered you just lose the content because the text is getting smaller..and in internet explorer it stays centered but everything gets smaller.
Other than those little problems which aren't that big of a deal, there isn't any way to fix that. |
|
|
|
![]() ![]() |