| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor|
|Centering links in DIV|
| 7:21 pm on Jan 4, 2003 (gmt 0)|
Here's another problem I am struggling with ...
I have a menu that consists of a DIV with anchors in it.
<A class="MenuItem" href="">Menu Item 1</A>
<A class="MenuItem" href="">Menu Item 2</A>
In IE, I get a menu with centered menu-items that are aligned left.
In mozilla, I get a menu with everything aligned left.
I guess that Mozilla doesn't allow a text-align center to align block elements within a div ...
How can I do this?
| 8:53 pm on Jan 4, 2003 (gmt 0)|
Yoeri- Welcome to Webmaster World.
You should set the margins to auto anyway, text-align should be used for text.
border: 1px solid #ccc;
I think this is what you're trying to do. I put borders in to see what was happening.
| 11:05 am on Jan 5, 2003 (gmt 0)|
work like I want it :-)
Never used the auto value for the margins ... will take a look at what it exactly does .
| 11:22 am on Jan 5, 2003 (gmt 0)|
I found another link in the forum that gives the solution ...
The text-align center is being used to center block alements in IE5 ... guess I am working to much with IE :)
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved