Jump to content
  • Advertisement
Sign in to follow this  
LongInteger

[web] display: inline . . cant get it to work

This topic is 4444 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Cant get this to work at all. Ive tried putting it into a class and an id but cant get a (ol) to display inline. are there some other ways i can make a list of text which will be links display inline without using tables? Thanks oh im mainly using IE but have moz on just for testing

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by LongInteger
Cant get this to work at all. Ive tried putting it into a class and an id but cant get a (ol) to display inline. are there some other ways i can make a list of text which will be links display inline without using tables?

Thanks

oh im mainly using IE but have moz on just for testing


Have you tried putting it into the <li> tags instead of the <ol> tags?

Share this post


Link to post
Share on other sites
Quote:
Original post by Excors
Or try putting it on both, instead of instead.


It really depends on the desired behavior. To inline just the elements themselves while maintaining the rest of a list's behavior then keep them in the <li>. If you want the entire control to flow inline with surounding text then you would add it to both.

Just on <li>.

On <li> and <ol>. Then you would probably want to set the padding on the <ol> to 0px as well.

Share this post


Link to post
Share on other sites
yeah even declaring al, (li) elements as li {display: inline;} doresnt do anything, they still come out as an ordered list.

my code is like the follows


.nav{ display; inline;}

//added this next

li{display: inline;}
----------------------------------

<ol class="nav">
<li>home</li>
<li>news</li>
<li>about</li>
</ol>




is thee something im doing wrong

Share this post


Link to post
Share on other sites
Quote:
.nav{ display; inline;}

That says "display[semicolon]" when it should be "display[colon]". If you fix that, you should get something like this.

If you want to get rid of the gap on the left, it seems you have to do both padding:0 and margin:0 for it to work in most browsers.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!