I am kinda of a newbie to css as well. Could u show an example of
setting an inline css div and how it works in the .html.erb file?
Actually, the example shown in the previous post does show your both the
HTML and CSS. The example is not using a
but rather an unordered
list
with list items
which is then styled to be rendered
inline .my_list {display: inline;}.
However, you are likely going to need some additional styles applied to
get the effect that you’re after. Like the one to turn off the bullets
on the list items (list-style-type: none;} and you may need to adjust
margins and padding {margin: 0; padding: 0}.
In a ideal world it would be great if you could use {display:
inline-block;} that would render each list item as a block rather than
inline, but still render horizontally. IMPORTANT: display: inline-block;
is not yet well supported, even by modern browsers. I found that Safari
4.0 (Dev Preview) does support it, but Firefox 3.0 does not.
Also note that I personally use {float:left;} rather than {display:
inline;} Which achieves a very similar effect as {display:
inline-block;}, but is better supported by current browsers.
tyliong wrote:
I am kinda of a newbie to css as well. Could u show an example of
setting an inline css div and how it works in the .html.erb file?