Header image lines up differently in firefox and IE |
![]() ![]() |
Header image lines up differently in firefox and IE |
![]()
Post
#1
|
|
Newbie ![]() Group: Member Posts: 2 Joined: Oct 2008 Member No: 694,815 ![]() |
Hi,
I'm creating a layout for a charity... I typically don't do this but I thought it was a good cause and I wanted to help them out. I found some code to create a header image and I put in a background. Everything looks great in Firefox but in IE it's moved to the right about 2 pixels. I found some older posts that talked about div padding so I tried to do something with that with no luck. Any help you can give me is greatly appreciated. My page is here: DAT site Here's my code: CODE <style>
body { background-position:top center; margin-top: 178; } div.topbanner { top: 0; left: 49%; margin-left: -445px; width: 906px; height: 178px; position: absolute; style="padding:0px"; } body.bodyContent { background-color: 17a3b4; background-position: center center; background-repeat: repeat-y; background-attachment: scroll; background-image: url('http://www.bullzeyedesign.com/_clients/dat/datbg.jpg') !important; } tr { background-color: transparent; } div table { background-color: transparent; } table, tr, td { background-color: transparent; border: none; border-width: 0; } </style><div class="topbanner"><img src="http://www.bullzeyedesign.com/_clients/dat/dat_header.gif" border="0" height="178" width="916" /></div>
Reason for edit: Please use [codebox] tags when posting codes. - Mike
|
|
|
![]()
Post
#2
|
|
![]() Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 ![]() |
Try this:
CODE <style> body { background-position:top center; margin-top: 178; } div.topbanner { top: 0; left: 50%; margin-left: -453px; width: 906px; height: 178px; position: absolute; style="padding:0px"; } body.bodyContent { background-color: 17a3b4; background-position: center center; background-repeat: repeat-y; background-attachment: scroll; background-image: url('http://www.bullzeyedesign.com/_clients/dat/datbg.jpg') !important; } tr { background-color: transparent; } div table { background-color: transparent; } table, tr, td { background-color: transparent; border: none; border-width: 0; } </style><div class="topbanner"><img src="http://www.bullzeyedesign.com/_clients/dat/dat_header.gif" border="0" height="178" width="906" /></div> By the way, that's a good deed you're doing. ![]() |
|
|
![]()
Post
#3
|
|
Newbie ![]() Group: Member Posts: 2 Joined: Oct 2008 Member No: 694,815 ![]() |
Thanks for all of your help! It's working great and the DAT loved it:
http://www.myspace.com/raisediabetesawareness |
|
|
![]()
Post
#4
|
|
![]() Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 ![]() |
Topic closed & moved.
|
|
|
![]() ![]() |