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

Started by
6 comments, last by LongInteger 17 years, 7 months ago
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
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?
Or try putting it on both, instead of instead.
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.
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 nextli{display: inline;}----------------------------------<ol class="nav"><li>home</li><li>news</li><li>about</li></ol>


is thee something im doing wrong
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.
It might also help if you could provide us with a link to see if the problem lies elsewhere.
sorry that was a typo it was a colon

This topic is closed to new replies.

Advertisement