Reply to Re: Left border not wanted when list items wrap...

Your name:

Reply:


Posted by Jonathan N. Little on 03/19/06 02:51

dorayme wrote:
> In article <441b820c$0$3689$cb0e7fc6@news.centralva.net>,
> "Jonathan N. Little" <lws4art@centralva.net> wrote:
>
>
>>dorayme wrote:
>>
>>>Anyone any ideas on how to be rid of left border when a
>>>horizontal menu list wraps, ie. imagine a line of list links
>>>wrapping to a second line and the border is not wanted at the
>>>start of the second line? Notice how the left border is left out
>>>of the start of the first line (no credit to me on this, I did
>>>not invent), now I wonder if there is any reasonable technique to
>>>be rid of "similar" when wrap occurs. I am not interested in
>>>javascript and I can think of ways of avoiding this "problem" but
>>>is there a simple actual solution? (If need be, narrow your
>>>window and/or up your text size)
>>>
>>>See:
>>>
>>>http://dorayme.150m.com/test/waywardKing.html
>>>
>>>(BTW, don't try the chess problem unless you are a reasonably
>>>strong player...)
>>>
>>
>>Look at ihe problem another way, try adding a border! Put border on both
>>left & right on LIs so when it wraps it will not look odd.
>
>
> Sounds a bit complicated, then having to get rid of the naturally
> forming double border eh? I will look at this and there's that
> border collapse business I have never looked into...
>
> It seems ok with this right border and last-child device... at
> least in my FF and other Mac browsers... not tested _all_ of them
> though...

There is no last-child. And IE's support of these selectors is spotty at
best.

This is simple and seems to look okay, even in MSIE.

#navStrip UL {
line-height: 2;
margin: .2em;
padding: 0;
}

#navStrip LI {
display: inline;
list-style-type: none;
margin: 0 -.2em;
padding: .25em .5em;
border-left: 1px solid #00C;
border-right: 1px solid #00C;
}




> Does Win IE understand last-child? (God, I do hope there is such
> a thing as "last child" and it is not just working by magic. I am
> too frightened to look up the specs. I don't mean to demean any
> human by such failure, honest, cross my heart...
>
> Formerly, I would do this type of nav strip with the lowdown
> communistic presentational device of &nbsp;|&nbsp; It worked well
> and had the rather nice advantage of scalling with the font...

Works will scaling text too.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация