OZONE Asylum
Forums
CSS - DOM - XHTML - XML - XSL - XSLT
How to align center a floated left unorderd list
This page's ID:
29415
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Hi Everyone I am also having a similar problem placing a horizontal menu in the center of the screen, the above appears to work fine with text only in the menu until I add a background image: My HTML code is as follows: <body> <ul id="center"> <li><a href="#">Home</a></li> <li><a href="#">About us</a></li> </ul> </body> The Stylesheet for the above is as follows: @charset "utf-8"; /* CSS Document */ ul#center{ position:fixed; bottom:0px; margin-left:auto; margin-right:auto; margin-top:0px; margin-bottom:0px; width:100%; background-color:#b0e0e6; list-style:none; text-align:center; } /* Clears the bottom margin and padding around your ul's and li's */ ul#center, ul#center ul { margin: 0; padding: 0; list-style: none; text-align:center; display:inline; } /* End of ul's and li's margin and padding clearing */ ul#center li{ position:relative; display:inline; width:98px; height:30px; text-align:center; } ul#center li a { display:block; font-family:Arial, Helvetica, sans-serif; outline:0; text-shadow:1px 1px 1px #000; text-decoration: none; color: #ffffff; height:30px; line-height:30px; width:98px; text-align:center; background:url('../images/image.jpg') no-repeat 0 0; } You may try it out with own image in place of image.jpg. Thanks
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »