Afficher un message
Vieux 11/04/2008, 21h42   #4
Jonathan N. Little
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Horizontal CSS list, last entry right-aligned?

vulpes wrote:
>> URL to what you are trying....

>
> ... is (or better said a minimal example)
>
> http://www.cis.hut.fi/ntvuok/tmp/index.html


Not perfect, works in gecko and Opera. IE7 needs a tweak for your
border. Fails in IE6 but so does your original. Your attempt at XHTML
isn't ing if you wan IE on board...reasons much discussed here...

#navlist {
background: #eee;
position: relative;
border-top: #ffa500 1px solid;
border-bottom: #ffa500 1px solid;
overflow: hidden; /* <- Add to contain floats */
}

#navlist li {
display: block; /* <- make floats to left */
float: left;
}

#navlist li > a {
color: black;
text-decoration: none;
padding: 0 1em 0 1em;
}

#navlist li.current > a {
background: #ddd;
}

#navlist li > a:hover, #navlist li > a:focus {
background: #d1e5fd;
}

#navlist li#rightAlign {
float: right; /* <- make last float to right */
}


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  Réponse avec citation
 
Page generated in 0,05557 seconds with 9 queries