stretch div with no content

This is a discussion on "stretch div with no content" within the Web Page Design section. This forum, and the thread "stretch div with no content are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 13th, 2007, 07:57
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
stretch div with no content

Hi,

This page:

xxxxx

has a div containing the mic stand image on the left, and another holding the images on the right. Is it possible to have the left div stretch vertically to match the right one?

Also, With the image layout, can I have the second row of images clear the row above it, so there's 5 images on each row??

Thanks,

Nathan.

Last edited by nate2099; Jul 14th, 2007 at 10:45.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 13th, 2007, 12:21
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: stretch div with no content

First question) Look into the Faux Columns method

Second question) You really shouldn't be using the paragraph element (<p>) for those boxes ... the aren't paragraphs. I would wrap them individually in <div> and float them. To clear float for this type of thing I would add a clearing div where you want to change lines

Code: Select all
.clear {
    clear: both;
}

....

<div class="clear"></div>
HTH

Last edited by karinne; Jul 13th, 2007 at 12:24.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 13th, 2007, 12:24
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: stretch div with no content

I believe if you add a large enough height to each div.float, you'll get what you want:
Code: Select all
div.float {

  float: left;

  padding-left:10px;

  text-align: center;

  color: #333333;
  height: 250px;*/or whatever you want/*

  }
Can you make the background mike image longer?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 13th, 2007, 13:33
SuperMember

SuperMember
Join Date: Apr 2007
Location: Sydney
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Re: stretch div with no content

Thanks for that, the faux coloumn method works a treat!!

For the clear div, do you mean I should do somethig like

Quote:
if (images printed is a multiple of 5) echo <div id = 'clear'>
And in the clear div set clear: ??? (is there an attribute "all"??)


Setting the height does work, but considering there may be up to 12 lines of text with each pic, I'd prefer if they were only as high as they needed to be!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 13th, 2007, 13:36
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: stretch div with no content

Quote:
Originally Posted by nate2099 View Post
For the clear div, do you mean I should do somethig like

Quote:
if (images printed is a multiple of 5) echo <div id = 'clear'>
Sure ... i guess that would work

Quote:
Originally Posted by nate2099 View Post
And in the clear div set clear: ??? (is there an attribute "all"??)
It's clear: both; ... like I already stated above.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
stretch div vertically, no content

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to get my footer to stretch Gav Web Page Design 3 Dec 16th, 2007 14:15
Div stretch to bottom in IE6 Aso Web Page Design 16 Nov 27th, 2007 12:49
[SOLVED] wont stretch lostyboy Web Page Design 2 Oct 18th, 2007 14:25
Site Stretch with Content? CodyFunderburg Web Page Design 4 Nov 20th, 2006 14:58
CSS stretch footer vertically? uqwebdesign Web Page Design 2 Oct 24th, 2006 20:09


All times are GMT. The time now is 14:16.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42