Forum Moderators: not2easy

Message Too Old, No Replies

newbie needs help with inline list (won't display inline)

         

emjaysea

3:18 pm on Apr 1, 2011 (gmt 0)

10+ Year Member



Why won't this display inline?

<!--
<style type="text/css">
#navlist li
{
display: inline;
list-style-type: none;
padding-right: 10px;
}
</style>
-->

<div id="navcontainer">
<ul id="navlist" style="margin-left: 2px;">
<li><img alt="Conservation Service Award Medal" src="/images/dnr/conservationaward_349299_7.jpg" width="115" height="180"></li>

<li><div style="width: 400px;">To honor scouts who make a commitment to participating with the DNR in stewardship of Michigan's natural resources, we have created a Conservation Stewardship Award. By completing activities and other scout achievements and providing conservation stewardship service hours through the DNR, younger scouts can earn a Conservation Stewardship patch and older scouts are eligible to earn a Stewardship medal. Older scouts are also eligible to receive pins to attach to the medal after completing additional achievements and stewardship hours. For more information, see the links below.</div></li>

<li><img alt="Conservation Service Award Medal" src="/images/dnr/conservationaward_349299_7.jpg" width="115" height="180"></li>

</ul>
</div>

The doc type is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
I have no control over doc type, nor do I have access to head. I'm a peon working on a big site via CMS.
Thanks!

birdbrain

3:31 pm on Apr 1, 2011 (gmt 0)



Hi there emjaysea,

and a warm welcome to these forums. ;)

You have commented out your style sheet completely.

The removal of both the <!-- and the --> should renew your will to live.:)

The li elements will not display inline, though, because the second element
contains a block level element.

Add Float:left to your #navlist li rules to rectify this. ;)

birdbrain

emjaysea

5:19 pm on Apr 1, 2011 (gmt 0)

10+ Year Member



Thanks, bro--that worked a trick. And here I thought the comments tag was to keep older browsers from displaying the style tags...

birdbrain

5:24 pm on Apr 1, 2011 (gmt 0)



Hi there emjaysea,

they were, but placed within not without the style tags. ;)

Their use within, though, is now totally unnecessary. :)

birdbrain