Jump to content

I thought this horizontal list would be 100% of page


mulletgut

Recommended Posts

Hello folks, thanks for your time,I have used some code from one of the css tutorials for making a horizontal navigation menu, and built on it a little. I want it to autostretch to be 100% page width but it doesn't seem to want to play the game for me (I obviously don't understand the rules), every attempt I make ends up seeing the list go vertical. I can do it with a table and images but would much rather have it work in css.Any help would be greatly appreciated.

<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css">ul{float:left;width:100%;padding:0;margin:0;list-style-type:none;}a{float:left;width:6em;text-decoration:none;color:yellow;background-color:black;padding:0.2em 0.6em;border-right:1px solid white;}a:hover {background-color:#FFFF99;color:black}li {display:inline}</style></head><body><ul><li><a href="#">Home</a></li><li><a href="#">Meetings</a></li><li><a href="#">Brag Board</a></li><li><a href="#">Photo Gallery</a></li><li><a href="#">Forums</a></li><li><a href="#">Links</a></li><li><a href="#">Rules</a></li><li><a href="#">Contact Us</a></li></ul></body></html>

Link to comment
Share on other sites

works in Netscape 7 on a mac. Have you tried clearing your cache and re-loading it?
Well I guess it's good to know it works somewhere :) I have cleared cache's and previewed in Firefox, Opera and IE7 and it still pulls up well short of the page edge. Depending on the window size of course. On thi laptop it's a good quarter of a window/page, on the desktop it's probably an eighth.I shall plod on........... thanks for the response**EDIT**I just noticed that in this turtorial at w3schools, the list in the tutorial isn't showing as 100% page width either. ?????? Cool. More confusion. :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...