On Mon, Mar 2, 2009 at 10:20 AM, <[email protected]> wrote:

> Hi All,
>
> I am struggling to get 3 <div>'s on the same line. When I use 2 <div>'s
> it's okay, but how should I do it for 3 <div>'s ?
> Code to reproduce:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <style type="text/css">
> div.container { width: 100%; margin: 0px; border:1px solid gray;
> line-height: 110%; }
> div.left { float: left; width: 150px; margin-top: 20px; padding: 1em; }
> div.content { margin-left: 165px; margin-top: 20px; width: 600px; padding:
> 1em; border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0; }
> div.right { margin-left: 900px; margin-top: 20px; width: 100px; padding:
> 1em; }
> </style>
> </head><body>
> <div class="container">
> <div class="left">my left menu ...</div>
> <div class="content">my content ...</div>
> <div class="right">my right stuff</div>
> </div>
> </body></html>TIA, Cor
>

"Stay on the same line" in what context?

Viola!

http://www.trotlc.com/sandbox/

Of course, I could bind the parent with a width large enough to hold them,
but who cares?

The picture is more of a statement about what I do all day than your
question, and it's copied from my sandbox on the private intranet. It's
often very, very apt.

Of course, this is a very basic, foundation-only solution, more to give you
an idea.

-- 
-Jack Timmons
http://www.trotlc.com
Twitter: @jorachim
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to