Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 02-25-2008, 09:36 PM CSS stretch
Extreme Talker

Posts: 176
Trades: 0
http://balloonfightforever.bit-digita.com/t.htm

I can't even get this to work, never mind on the actual site.
The red don't go to the bottom, and if nothing is in them, they go away.

Any tips?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>.::Balloon Fight Forever::.</title>
<style type="text/css">
div.container {width: 440px; background: #00f;}

div.o {width: 20px; height: 100%; background: #ff0000; float: left;}
div.oo {width: 400px; background: #00ff00; float: left;}
div.ooo {width: 20px; height: 100%; background: #ff0000; float: left;}
</style>
</head>

<div class="container">
    <div class="o">o</div>
    <div class="oo">Hello<br>hihi</div>
    <div class="ooo">o</div>
</div>

<body>


</body>

</html>
Skeddles is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-25-2008, 09:46 PM Re: CSS stretch
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
What exactly is it you're trying to do?
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 02-25-2008, 09:54 PM Re: CSS stretch
Extreme Talker

Posts: 176
Trades: 0
Quote:
Originally Posted by Arenlor View Post
What exactly is it you're trying to do?
make all 3 the same height when the middle one changes
Skeddles is offline
Reply With Quote
View Public Profile
 
Old 02-25-2008, 10:11 PM Re: CSS stretch
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
I don't know how to help you then, sorry.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 02-26-2008, 03:42 AM Re: CSS stretch
RadGH's Avatar
Skilled Talker

Posts: 76
Name: Radley
Trades: 0
It's difficult to have dynamic-scaling div's. It would make your life much easier to use a fixed size div.

When you give a div the "100%" height attribute, most of the time it doesn't know what the 100% is compared to. Itself? Its container? The body of the website?

Div's really aren't that smart - and I hate them. But heres one of the easiest solutions, given you know the height of your div. Notice that this sets the container height, rather than the middle div's height.

HTML Code:
<div class="container">
    <div id="leftdiv">&nbsp;</div>
    <div id="centerdiv">
        <p>This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. </p>
        <p>This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. </p></div>
    <div id="rightdiv">&nbsp;</div>
</div>
<style type="text/css">
div.container {width: 500px;
    height: 300px; }

#leftdiv {
    float: left;
    width: 100px;
    height: 100%;
    background-color: #777;
}
#centerdiv {
    float: left;
    width: 300px;
    height: 100%;
    background-color: #CCC;
    overflow: hidden;
}
#rightdiv {
    float: right;
    width: 100px;
    height: 100%;
    background-color: #777;
}
</style>
RadGH is offline
Reply With Quote
View Public Profile
 
Old 02-26-2008, 03:46 PM Re: CSS stretch
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
1 - Read the sticky at the top of this forum about 100% height.

2 - If you want all 3 to appear the same, then go for the faux columns method:
http://www.alistapart.com/articles/fauxcolumns/

Much easier to achieve, minimum effort.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-27-2008, 07:27 PM Re: CSS stretch
Extreme Talker

Posts: 176
Trades: 0
I need it to stretch no matter what.
I also need it to go vertical and horizontal, so faux method is out.

It appears that I can not do what I need with CSS. I don't understand what the big deal is, if you can't do these things. I'm going back to tables. I have a perfectly working site in all browsers, and its just tables.
http://skeddles.com/
Skeddles is offline
Reply With Quote
View Public Profile
 
Old 02-28-2008, 04:51 PM Re: CSS stretch
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
There's always the javascript method. Don't just wimp out and go back to nasty tables for layout.

The 'big deal' seems to be that you don't seem to want to make any adjustments to make table-less solutions work -which is what you have to do sometimes for some layouts. There are LOTS of solutions for fluid designs:
http://css-discuss.incutio.com/?page=FluidDesign
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS stretch
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32471 seconds with 12 queries