Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ordered List in IE7

Status
Not open for further replies.

ca8msm

Programmer
May 9, 2002
11,327
GB
Why does IE7 revert each list item back to "1" when a height is added to the li element? Firefox still numbers them #1-5.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
  <head>
    <title>Test</title>
    <script type="text/javascript">

    </script>
    <style type="text/css">
     ol li {height:40px;}
    </style>
  </head>
  <body>

<ol>
  <li>This</li>
  <li>is</li>
  <li>just</li>
  <li>a</li>
  <li>test</li>
</ol>
  </body>
</html>


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Hi Mark,
don't know what the answer is, but if you change {height:40px;} to {line-height:40px;} it works a treat. Don't know if this is what you wanted, but it worked for me.
I would like to know why the {height:40px;} didn't work as well !!


Steve
 
Thanks Steve, it's good to know a workaround as I'm sure this will be useful in the future. It was more a question of why it happens though, as I don't actually need this for anything.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
This must be the funniest IE7 bug I've seen. Make sure you submit it to M$.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Do you have an address of where to send it to? I couldn't find a link on the "connect" site for IE7, and the link on their blog now shows a page not found message for me!


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
fyi, IE6 gives the same 'incorrect' result.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top