worldnews — 2011-09-21T00:23:05-04:00 — #1
I want to have multiple divs next to one another, without them breaking into a new line, but all staying in same line.
<div class="name_lable">User name:</div> <div class="name_form">John Doe</div>
How does one do this?
And just to make sure: your suggestion should also work on IE.
dresden_phoenix — 2011-09-21T01:22:46-04:00 — #2
the MOST basic way is to use FLOAT
you can float:left or float:right.
floats remove the element from the normal flow and shrink wrap it ( so you might need to specify a width along with your float declaration. You will also want to clear the floats. By far the BEST WAY is to give overflow:hidden; to the parent element.
Another way... is to make give your elements display:inline-block. you will probably want to add -moz-inline-box in your rules for OLD Firefox.
Hope that helps
worldnews — 2011-09-21T12:58:25-04:00 — #3
It is not working.
You can see a sample page here:
Check out the section at bottom of page labeled: More details about me
Those Label Value pairs should be in the same line, but they are not!
I also tried display:inline-block, and it was even worst
paulob — 2011-09-21T13:14:14-04:00 — #4
Check your widths as they are greater than the space available.
Just add a background colour and you will see that they overlap.:)
system — 2011-09-21T15:00:22-04:00 — #5
I can't even find in your page where you're trying to do that -- but to be brutally frank placing a couple of DIV are the least of your issues with the horde of outdated 1990's style HTML! Tables for layout, tags like FONT and CENTER that have zero business on a website written after 1998, use of bold tags on what should probably be headings, use of bold tags on what should be DT's... that's how you end up with 16k of HTML for 2.7k of content -- basically two or three times as much code as should be necessary... hence the 127 validation errors meaning you don't even have HTML, you have gibberish.
Even simple things like the attempt to use italics inside TITLE -- which can only contain CDATA -- are an indication the whole thing needs to be thrown away and redone from scratch as there's nothing there I'd even TRY to save, much less deploy.