Welcome to WebmasterWorld Guest from 54.224.50.28

Forum Moderators: not2easy

Message Too Old, No Replies

Need three columns with the same border height

     
7:04 am on Aug 3, 2006 (gmt 0)

New User

10+ Year Member

joined:Apr 21, 2005
posts:24
votes: 0


Hi guys. Let me put my question here. and thanks in advance..

I have a page with three columns of text.
.columnfirst, .columnsecond {
border-right: 1px solid #999;
margin-right: -1px;

First column has the content of 50 lines , second has the content of 25 lines and the third of 20 lines.
As in the style each column has the border given which acts as a separator between the columns, but I want this line to be of same height for all the three columns. Now it takes only the line(border)till the content. Height=”100% doesn’t work

Thnx!
Designer-Dude --------

11:27 pm on Aug 9, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 9, 2004
posts:160
votes: 0


contain your columns in one container which would have a repeating background image which would give the illusion of the borders, and line an image at the top and bottom to show the top and bottom of the boxes. You'll also have to contain 2 of the columns in its own container and make sure you clear your floats.

like this:

css:
#content{width:800px;}
#firstandsecond{width:400px;float:left;}
#first{width:180px;float:left;}
#second{width:180px;float:right;}
#third{width:180px;float:right;}
.clear{clear:both;}

html
<div id="content">
<div id="firstandsecond">
<div id="first">first column</div>
<div id="second">second column</div>
<div class="clear"></div>
</div>
<div id="third">third column</div>
<div class="clear"></div>
</div>

9:16 am on Aug 12, 2006 (gmt 0)

New User

10+ Year Member

joined:July 25, 2006
posts:8
votes: 0


You can try to add this css code to every column

padding-bottom:32767px;
margin-bottom:-32767px;

12:12 pm on Aug 12, 2006 (gmt 0)

Senior Member from FR 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts:4419
votes: 9


offline, what is the idea driving your suggestion
I do not understand (I am not a CSS guru) how one negating the other expends any col to match the longest one or helps to be 100% height?
6:37 pm on Aug 12, 2006 (gmt 0)

New User

10+ Year Member

joined:July 25, 2006
posts:8
votes: 0


It will not be 100% height, but all columns heights will be equal
11:46 pm on Aug 13, 2006 (gmt 0)

New User

10+ Year Member

joined:Aug 13, 2006
posts:15
votes: 0


What about using a table? Then each of the columns would automatically be the same, as the column with the most content, will naturally drive the height of the other two columns.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members