|
Posted by Els on 06/19/06 06:13
dorayme wrote:
> CSS:
>
> ul {margin:0;padding:0;}
> li {list-style-type:none;margin:0;padding:0;display:inline;}
>
> HTML:
>
> <ul>
> <li>Item1</li>
> <li>Item2</li>
> <li>Item3</li>
> </ul>
>
> There is, naturally a space between the text of the links. Could
> someone please remind me how to find out how many ems this is in
> any particular browser without trial and error, given no more
> than the above css and html. How standard is this space among
> browsers? Or is it too browser dependent?
>
> I can get this in Safari:
>
> Item1Item2Item3
>
> by
>
> li {
> margin-left: -0.2em;
> margin-right: -0.2em;
> }
>
> Not that I want to end up removing the space! I am thinking about
> this to better control something a bit more complicated to do
> with borders and inline lists. I have a guess solution which
> works not bad on my browsers, but be nice to know any deeper
> answer to above. I get hazy about the issue ;-)... the exact
> "whereabouts" or any space reserved or fossilized for the missing
> list item marker and other things has always slightly puzzled
> me...
Not sure if this is what you are looking for, but if you write the
list without space or newline between the list items, like so:
<ul><li>Item1</li><li>Item2</li><li>Item3</li></ul>, the visual space
between the items will also disappear.
Then, with margin-left/right, you can set the exact space you like.
--
Els http://locusmeus.com/
[Back to original message]
|