NAv: Inline display or float left?

What would be a better approach for <ul>, inline display or float? If using inline, do I need to use inline display for both <li> and <ul>? why?

that depends what you want to achieve, for example i made a simple navigation menu here:

http://jsbin.com/bewepiy/edit?html,css,output

given i want also some items on the right hand side, i am better of using float and given the li elements an inline display.

There isn’t one universal answer to your question.

but for example here:

http://jsbin.com/pifuha/edit?html,css,output

i don’t not want to use float: left, given it ruins my nice navigation menu.

i hope this shows there isn’t a single best solution, you need to understand what the different css properties do and how they play together.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.