Log In · Register

 
positioning help
shynomi
post Mar 13 2010, 07:24 PM
Post #1


Senior Member
****

Group: Member
Posts: 123
Joined: Nov 2008
Member No: 698,881



My headers are always off by 1 px either in safari or FF. I can get it right in IE and FF but it'll be off by a pixel in Safari or vice versa.

Here is my code for the top header:

CODE
<div id="BannerUnderTopNav" style="position:absolute; z-index:2; margin-left:-346px;  _margin-left:-333px; top: 0px; background-color:COLOR; background-image:URL(http://i382.photobucket.com/albums/oo268/dygynomi/2010%20THOSE%20VICTORIOUS/header1.jpg); background-repeat: no-repeat; background-position: bottom center; width:823px; height:2017px; overflow:no;}">

</div>


I have the _margin-left: xxx for IE and the other margin attribute for FF and Safari.
But as you can see here: http://www.myspace.com/frucatestpage

it'll be a px off in FF but right in safari.

Let me know if there's something I can add in the code to fix that.
Thanks guys!
 
 
Start new topic
Replies
Mickey
post Mar 17 2010, 05:25 PM
Post #2


Treasure Pleasure
********

Group: Head Staff
Posts: 11,193
Joined: Oct 2005
Member No: 281,127



Replace this chunk:

CODE
<style>
.profileWidth {
padding-bottom:1806px !important;}
</style>


<div id="BannerUnderTopNav" style="position:absolute; z-index:2; margin-left:-346px; _margin-left:-333px; top: 0px; background-color:COLOR; background-image:URL(http://i382.photobucket.com/albums/oo268/dygynomi/2010%20THOSE%20VICTORIOUS/header1.jpg); background-repeat: no-repeat; background-position: bottom center; width:823px; height:2017px; overflow:no;">

With this:

CODE
<style>
.profileWidth {
padding-bottom:1806px !important;}
.header {position: absolute; top: 0px; left: 50%; margin-left: -415px; padding: 0px; z-index: 2;}
</style>


<div class="header"><img src="http://i382.photobucket.com/albums/oo268/dygynomi/2010%20THOSE%20VICTORIOUS/header1.jpg" alt="" /></div>

Then replace this:

CODE
body{ font-size:x-small;
background-color:cbc8af;
background-image:url(http://i382.photobucket.com/albums/oo268/dygynomi/2010%20THOSE%20VICTORIOUS/bg2.jpg);
background-attachment:scroll;
background-repeat: no-repeat;
background-position:top center;
margin-top: 0px;}

With this:

CODE
body{ font-size:x-small;
background-color:cbc8af;
background-image:url(http://i382.photobucket.com/albums/oo268/dygynomi/2010%20THOSE%20VICTORIOUS/bg2.jpg);
background-attachment:scroll;
background-repeat: no-repeat;
background-position:top center;
margin: 0px;
padding: 0px;}

Finally, change the widths of the header image and the background so you're working with even numbers. Right now, the width is 823px.
 

Posts in this topic


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