Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-23-2009, 06:15 PM   PM User | #1
mjb
New Coder

 
Join Date: May 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
mjb is an unknown quantity at this point
vertically expanding divs

Hey everyone. Is it possible to vertically expand this text area. Here's the file. http://jlandbirk.googlepages.com/index_a.html

<!-- middle -->
<div id="middlediv" style="position: absolute; left: 174px; top: 87px; width: 638px; height: 314px; z-index: 6;">
<img src="middle.gif" name="middle" align="top" border="0" height="314" width="638">

</div>

Thanks for your time
mjb is offline   Reply With Quote
Old 11-23-2009, 06:29 PM   PM User | #2
j05hr
Regular Coder

 
Join Date: Nov 2008
Posts: 175
Thanks: 4
Thanked 6 Times in 6 Posts
j05hr is an unknown quantity at this point
Take the height: 314; away and it will automatically be as long as your text is.
j05hr is offline   Reply With Quote
Old 11-23-2009, 06:43 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello mjb,
You can remove the height; 305px; from #Placeholderdiv and see where your text is.
Removing the height from #middlediv isn't going to help you much because your absolutely positioned #bottomdiv isn't going to move.

You should be able to accomplish that layout without using absolute positioning.

As an alternative, have a look at this solution - http://nopeople.com/CSS/slider/index.html - view the source to see how that's done.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-23-2009, 06:56 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Here's your images used in a layout with no ap. The text box will expand in height to wrap as much as you put in it.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body {
	font: 100.1% "Comic Sans MS";
	background: #FC6;
}
* {
	margin: 0;
	padding: 0;
	border: 0;
}
#top {
	width: 638px;
	height: 28px;
	margin: 30px auto 0;
	background: url(http://jlandbirk.googlepages.com/top.gif);
}
#container {
	width: 638px;
	margin: 0 auto;
	background: url(http://jlandbirk.googlepages.com/middle.gif) repeat-y;
	font-size: 0.8em;
}
	#container p {margin: 0 20px;}
#bottom {
	width: 638px;
	height: 36px;
	margin: 0 auto;
	background: url(http://jlandbirk.googlepages.com/bottom.gif);
}
</style>
</head>
<body>
<div id="top"></div>
    <div id="container">
            <p>
                Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
                aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no 
                sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam 
                nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo 
                duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
            </p>
            <p>
                Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
                aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no 
                sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam 
                nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo 
                duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
            </p>
    <!--end container--></div>    
<div id="bottom"></div>
</body>
</html>
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-23-2009, 07:47 PM   PM User | #5
mjb
New Coder

 
Join Date: May 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
mjb is an unknown quantity at this point
Thanks j05hr for your advice. i'll give that a try.

Excavator thank you for your code. you're quite the expert. I'll check out your link as well.
mjb is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

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

Forum Jump


All times are GMT +1. The time now is 06:38 AM.


Advertisement
Log in to turn off these ads.