Hi, If i have a heading tag and a list how do i display them on one line ? So code looks like - <h1>Headline</h1> <ul> <li>Hi world </ul> HTML: I want it to look like - Headline Hi world Make sense ?! Reps at the ready.
H tags have a line break automatically built into them. You need to use the display inline property in your css code. This will take the line break out. I don't know why you have the "hi world" in a list because you then have to do the same with that to take out the line breaks that a list puts in. Maybe it has something to do with what you are doing, but it would be best not to put the "hi world" in a list.
so far the css I have is this - It still does not get it on one line. hello world is an example, its a ticker tape. li{ list-style:none; } ul{ margin:0; padding:0; } h1{ font-size:14px; font-family: Arial, Helvetica, sans-serif; font-weight:normal; display:inline; } HTML:
You need to play with it in the ul/li parts as well because a list is all about putting things on a new line.
What fadetoblack said about the h1 having a newline is also still true for the ul (which is a block too) and the li's (which are also blocks). Pls close your li btw... yesh it's legal when writing HTML4 but it's not a good habit to get into, since the other really popular sgml child (XML) does require all tags to be closed (HTML4 just assumes tags are closed). It's kinda like letting your underwear stick up out from your pants. h1, ul, li { display: inline; }