We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    Hello,

    unfortunately, I couldn’t find a solution to the following issue: - when using display: inline for the list-items, I’m getting some padding on the right of the text - is this a known IE bug and is there a workaround?

    thank you in advance for your help.



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    * {
    	margin: 0;
    	padding: 0;
    }
    body {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	font-size: 10px;
    }
    ul.tmenu li {
    	list-style: none;
    	display: inline;
    	background: #FFCC99;
    	margin-right: 3px;	
    	}
    -->
    </style>
    </head>
    <body>
    <ul class="tmenu">
      <li>button</li>
      <li>button</li>
      <li>button</li>
      <li>button</li>
      <li>button</li>
    </ul>
    </body>
    </html>
      • 8461
      • 205 Posts
      do you have a URL?
        • 19889
        • 616 Posts
        Quote from: edge at Mar 12, 2007, 09:12 AM

        do you have a URL?

        sorry, no url - the only code is in my initial post
          • 25942
          • 11 Posts
          ul.tmenu li {
          list-style: none;
          display: inline;
          background: #FFCC99;
          margin-right: 3px;
          }


          Maybe? But I’m no coder.
            • 7455
            • 2,204 Posts
            use float:left instead of display: inline maybe this works it works when you have a vertical list.
              follow me on twitter: @dimmy01
              • 19889
              • 616 Posts
              Quote from: Dimmy at Mar 12, 2007, 09:56 AM

              use float:left instead of display: inline maybe this works it works when you have a vertical list.

              I guess float: left would work better cross-browser, wouldn’t it?
                • 7455
                • 2,204 Posts
                Yes and make sure that your doctype is ok

                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml">
                

                  follow me on twitter: @dimmy01