Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Positioning an li

Reply
Thread Tools

Positioning an li

 
 
C A Upsdell
Guest
Posts: n/a
 
      11-25-2003
>The other problem is that I wish to reduce the spacing between the li

The specs do not describe how markers (e.g. bullets) should be positioned,
leaving this up to the browser maker. So positioning the marker depends on
the browser. What I do (arggghhhh!) is use JS to generate different CSS for
different browsers.




 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      11-25-2003
C A Upsdell wrote:

> What I do (arggghhhh!) is use JS to generate different CSS for
> different browsers.


Why?

Just start with a base of:

ul, ol, li {
margin: 0;
padding: 0;
list-style: none inside;
}

and then build.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
 
 
 
C A Upsdell
Guest
Posts: n/a
 
      11-26-2003
"Toby A Inkster" <(E-Mail Removed)> wrote in message
news(E-Mail Removed). ..
> C A Upsdell wrote:
>
> > What I do (arggghhhh!) is use JS to generate different CSS for
> > different browsers.

>
> Why?


Because different browsers need different CSS to obtain comparable results.
E.g. on a site I just re-built:

For Gecko-based browsers:
ul li { margin:0 0 0 -2ex; padding:0 0 0.5ex 0; }

For IE6:
ul li { margin:0 0 0 2em; padding:0 0 0.5ex 0; }

For Opera 7:
ul li { margin:0 0 0 2em; padding:0 0 1ex 1ex; }

I repeat: the specs do not prescribe how the marker should be positioned,
or the LI indents controlled, leaving this up to the browser maker. And
different browser makers have made different choices ... even for different
versions of their browsers.



 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      11-26-2003
"C A Upsdell" <cupsdell0311XXX@-@(E-Mail Removed)> wrote:

>I repeat: the specs do not prescribe how the marker should be positioned,
>or the LI indents controlled, leaving this up to the browser maker. And
>different browser makers have made different choices ... even for different
>versions of their browsers.


http://www.alistapart.com/articles/taminglists/
http://devedge.netscape.com/viewsour...2/list-indent/

--
Spartanicus
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      11-26-2003
"C A Upsdell" <cupsdell0311XXX@-@(E-Mail Removed)> wrote:

>Because different browsers need different CSS to obtain comparable results.
>E.g. on a site I just re-built:
>
>For Gecko-based browsers:
> ul li { margin:0 0 0 -2ex; padding:0 0 0.5ex 0; }
>
>For IE6:
> ul li { margin:0 0 0 2em; padding:0 0 0.5ex 0; }
>
>For Opera 7:
> ul li { margin:0 0 0 2em; padding:0 0 1ex 1ex; }


I've just tried the above and the first set of styles in Gecko does
not match the second set in IE. And neither match teh third set in
Opera.

OTOH, the first set looks the same in all three browsers, ditto for
the other two sets.

Do you have some other styles (such as for ul) as well?

>I repeat: the specs do not prescribe how the marker should be positioned,
>or the LI indents controlled, leaving this up to the browser maker. And
>different browser makers have made different choices ... even for different
>versions of their browsers.


That is true. But have a look at
http://steve.pugh.net/test/test37.html

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Positioning in dropdownlists Peter J. Hunter ASP .Net 0 01-14-2004 04:13 AM
Dynamically positioning objects at run-time. Bill Zack ASP .Net 3 12-05-2003 03:49 PM
Dynamic server controls and positioning ASP .Net 1 11-27-2003 03:40 PM
Positioning user controls in a page John ASP .Net 0 06-30-2003 04:19 PM
Positioning Dynamically added controls Harry ASP .Net 1 06-25-2003 06:08 AM



Advertisments