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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

positioning elements using CSS

Status
Not open for further replies.

blues77

Programmer
Jun 11, 2002
230
CA
I'm having trouble postioning some elements using a class definition i wrote in one of my CSS. Currently the class looks like this:

.menu {position:absolute; font: bold 15px arial, helvetica, sans-serif; color:black; background-color:#0000b3; top:200px; left:320px }

this class is associated with a div tag in my html document and i want to be able to center the contents of the tag instead of using the "left" property. I tried text-align and align properties but neither seem to work.
any help would be greatly apprecied.

Thanks
 
I tried putting the align="center" option in the div tag but that doesn't seem to work either. I think the class must override it or something. Brawn

- The difference between genius and stupidity is that genius has its limits -
 
Its whatever is in between your div tags that is causing the problem. the Align=center does work on the div tag, just try removing all the code from in between the tags and just put some text in it and it will align center. It may be due to styles applied to elements inside your div tags.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top