homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

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

Msg#: 4549572 posted 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)



WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4549572 posted 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