Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css centering

Status
Not open for further replies.

baza

Programmer
May 15, 2001
20
ES
I am trying to centre my website with margin auto but the rest of the site is full of position absolute divs. Will I have to re align them all as relative divs or is there a way round this
 
are you saying that I just remove the position:absolute from the css
 
I'm saying that absolute positioning should only be used when absolutely necessary and in most cases you can just float items in order to get them correctly positioned. So, if they really need to be positioned absolutely them leave it in, otherwise remove it.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
solved the problem by doing this

div.container
{
width: 850px;
text-align: left;
position: absolute;
top: 0px;
left: 50%;
margin-left: -425px;
}
 
[thumbsup2]

That makes me think of cutting off your finger because it was hurting you.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top