SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old January 29th, 2004, 03:47 AM
bearqst bearqst is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Alaska
Posts: 153 bearqst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 47 sec
Reputation Power: 2
A question on CSS Floating Boxes

I was looking at http://www.thenoodleincident.com/tutorials/box_lesson/boxes.html and like the box idea. But I noticed that they are all Column aligned. Do you know how one would do a 4 box page with only 2 columns ? Four boxes one stacked on top of another, two boxes wide ?? I can't find any reference to it.

Reply With Quote
  #2  
Old January 29th, 2004, 12:15 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: A question on CSS Floating Boxes

I think the easiest way to do this is to start with the two box/two column example and simply duplicate the two boxes to be four (and change the ids accordingly). Also, duplicate the CSS and rename the copy of #content to #content3 and the copy of #content2 to #content4.

So, the CSS looks like:
Code:
#content1 { ... }
#content2 { ... }
#content3 { ... }
#content4 { ... }

and the HTML looks like:
Code:
<div id="content1"> ... </div>
<div id="content2"> ... </div>
<div id="content3"> ... </div>
<div id="content4"> ... </div>


The only problem now is if you want the rows aligned as well as the columns. To do that, use a spacer div between content2 and content3:
Add this to the CSS:
Code:
div.spacer { clear: both; font-size: 1px; }

And make the HTML look like:
Code:
<div id="content1"> ... </div>
<div id="content2"> ... </div>
<div class="spacer">&nbsp;</div>
<div id="content3"> ... </div>
<div id="content4"> ... </div>


The spacer's "clear: both;" style is the important part: it pushes everything down until it's past everything on its right and left, so then content3 and content4 can start at the same height.

Reply With Quote
  #3  
Old January 29th, 2004, 03:20 PM
bearqst bearqst is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Alaska
Posts: 153 bearqst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 47 sec
Reputation Power: 2
RE: A question on CSS Floating Boxes

Thanks Honcho, it was the "spacer's "clear: both" that thew me. I'll give it t try.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > A question on CSS Floating Boxes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Try It Free




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway