Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » div height issue

div height issue

Reply
  #1 (permalink)  
Old 07-30-08, 05:13 AM
jonnekke jonnekke is offline
Junior Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 642
Thanks: 0
Thanked 0 Times in 0 Posts
div height issue

Hi there..

I got this setup in my site:

HTML Code:
<div id="bodd">
	<div id="leftside"></div>
	<div id="contentArea"></div>
	<div id="news"></div>	
</div>
and this in my css:

Code:
html {
	height: 100%;
	width:100%; 
	margin-left: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-top: 0px;
	padding:0px;
}

body { 
	background-image: url(../images/bg.jpg);
	background-attachment: fixed;
	background-position: center top; 
	background-repeat: repeat-y;
	background-color: #ffffff;
	margin-top: 0px;
	margin-left: 2px;
	margin-right: 0px;
	margin-bottom: 0px;
	height: 100%;
}

#bodd {
	width:1000px; 
	height: auto; 
	margin-left:auto;
	margin-right:auto;
}

#linkerkant {
	float: left;
	margin: 0px;
	border: 0px;
	width: 190px;
	height:auto;
}

#contentArea {
	float: left;
	margin: 0px;
	border: 0px;
	width: 570px;
	height:auto;
}

#news {
	float: left;
	margin: 0px;
	border: 0px;
	width: 240px;
	height:auto; 
}
I would like to addapt the height of "#bodd" to the other divs. I thought it would be working
because the other div's are inside the "#bodd" but the height is not the same as the div's inside.
When I set to height: inherit; the height is 100% en not "longer" of the site is longer and I need
to scroll. How can I make this work?.

_j
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-04-08, 05:50 PM
m1` m1` is offline
New Member
 
Join Date: Aug 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
the problem is you can't use float:left with those divs inside #bodd, rather set
Quote:
#contentArea {
margin-left: 200px <-- use the actual width of #leftside instead of 200px
margin: 0px;
border: 0px;
width: 570px;
height:auto;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Height Issue darren132 CSS 23 01-29-08 05:49 PM
IE7 CSS Div Height koncept CSS 2 09-22-07 01:00 PM
Div height qie CSS 3 06-18-07 08:10 AM
div 100% height in IE hinch CSS 2 10-24-06 09:07 AM
semi-dynamic div height changes koncept JavaScript 2 05-03-05 11:20 AM


All times are GMT -5. The time now is 07:28 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.