HighDots Forums  

Block positioning / layout question

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Block positioning / layout question in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Block positioning / layout question - 10-01-2003 , 03:01 AM






I'm trying to make the transition from tables to CSS, and I need
someone to explain how to achieve the following layout (understanding
the concepts behind this layout will help me considerably in grokking
CSS positioning):

http://unifiedmind.com/images/css-example.gif

In this example, boxes one and two are wrapped in a box that is 100%
wide.

Box 1:
- variable width (varies by line length)
- nowrap

Box 2:
- 100% of remaining width

Box 2a;
- 50% of box 2

Box 2b:
- 50% of box 2

Thanks.

Reply With Quote
  #2  
Old   
James Thornton
 
Posts: n/a

Default Re: Block positioning / layout question - 10-01-2003 , 03:26 PM






Brian wrote:
Quote:
James Thornton wrote:

I'm trying to make the transition from tables to CSS, and I need
someone to explain how to achieve the following layout (understanding
the concepts behind this layout will help me considerably in grokking
CSS positioning):

http://unifiedmind.com/images/css-example.gif

Box 2:
- 100% of remaining width

Width: auto, which is the default. If box 2 will fit, it will sit to
the right of box 1, because box 1 is floated left. So no styles are
needed here.
Box two does fit, but when I give 2a and 2b each a width of 50%, it
appears that they are 50% of the screen, not 50% of box 2, so box 2b
flows below box 2a. How do I get box 2a and 2b to have a 50% width of box 2?

Here's my HTML:

<div class="box1">yada yada yada</div>

<div>
<div class="box2a">bla bla bla</div>
<div class="box2b">da de da de da</div>
</div>

Thanks.



Reply With Quote
  #3  
Old   
James Thornton
 
Posts: n/a

Default Re: Block positioning / layout question - 10-01-2003 , 04:40 PM



Brian wrote:
Quote:
James Thornton wrote:


Box two does fit, but when I give 2a and 2b each a width of 50%, it
appears that they are 50% of the screen, not 50% of box 2, so box 2b
flows below box 2a. How do I get box 2a and 2b to have a 50% width of
box 2?


Did you set a width on box 1?
Yes -- 150px.



Reply With Quote
  #4  
Old   
James Thornton
 
Posts: n/a

Default Re: Block positioning / layout question - 10-01-2003 , 05:47 PM



Brian wrote:

Quote:
James Thornton wrote:

Brian wrote:
time to supply a url to a test case.
http://unifiedmind.com/try/css.html
http://unifiedmind.com/try/james.css




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.