johnnyg24 Posted June 9, 2009 Share Posted June 9, 2009 I am trying to create a fluid layout where say a div is 90% wide and always centered. The problem I keep running into is when I try to set the top position to 50px. When I set the position to absolute and top to 50px, the positioning works but then the centering does not. Any help would be greatly appreciated. Here is what I have so far without the top positioning : #topNav {background-color:#9900FF;width:90%;margin-left:auto;margin-right:auto;} Link to comment Share on other sites More sharing options...
chibineku Posted June 9, 2009 Share Posted June 9, 2009 Don't set top position, set margin-top: 50px instead. Link to comment Share on other sites More sharing options...
johnnyg24 Posted June 9, 2009 Author Share Posted June 9, 2009 That works, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.