homepage Welcome to WebmasterWorld Guest from 174.129.130.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
list-style: square; rendering too big only in Internet Explorer
tbe22




msg:4549574
 7:48 pm on Feb 27, 2013 (gmt 0)


ul { list-style: square; }


is rendering way too big in Internet Explorer (I am only using 9, dont know about the rest). Even though it does not look very good, I would not worry about that, but I need to have a list of about 200 items in an iframe, and the squares are extending its height by about 100px.

I know I can get around this one by replacing the squares with a picture in css, but I would like to see if there is no easier way to fix it in the code (only for the IE9).

Thank you.

- - -

A screenshot can be viewed at:

g h e t t o - p o r n . c o m / s q u a r e s . j p g (no spaces; no adult content)

 

lucy24




msg:4549642
 1:53 am on Feb 28, 2013 (gmt 0)

Their exact rendering depends on the user agent.

This is CSS-speak for "You are SOL."

Would you believe this is really a font question? MSIE has historically been lousy at font substitution, and that's what is going on here. Not all fonts contain the "square" glyph (there are about half a dozen of them and I don't know which, if any, is specified for list markers) so it's down to the browser to find one. Unfortunately, solid black squares range widely in size from one font to the next.

I can think of one workaround off the top of my head-- I've used it to get oversized numbers without resorting to images-- but it's clunky so I'll wait for someone else to suggest a better approach.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved