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
CSS Expanding Nested boxes?
Old 07-27-2008, 07:53 PM CSS Expanding Nested boxes?
TreyeMe's Avatar
Experienced Talker

Posts: 49
Name: Mike
Location: NY
Trades: 0
some one just slap me if this is a dumb question but...

Im having such a pain with this layout Im trying to finish I am doing this for a friend and trying to keep it simple as Im not getting paid for it but simple doesn't seem to be working for me lol. This might be a little confusing and my code is very messy right now otherwise I would post it for an example. But Ill try my best to explain everything.

Basically Is there a way to expand a box with the size of a nested box.

I have a body box basically and inside is another box that will contain all the content of the page. But when I expand the "content" box it runs over the the "body" and does not expand.

Its a fixed design of a certain width but I want the height of both the boxes to run with the content as one box is smaller than the other one.

Sorry for the confusion and ask any questions you may have.

Thanks In Advance


Heres a visual and a some code of what im trying to do

Code:
[IMG]file:///C:/Users/TreyeMe/AppData/Local/Temp/moz-screenshot-4.jpg[/IMG]<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#body {
    position:absolute;
    left:300px;
    top:100px;
    width:500px;
    height:auto;
    z-index:1;
    background-color: #000000;
}
#content {
    position:absolute;
    left:12px;
    top:12px;
    width:476px;
    height:auto;
    z-index:2;
    background-color: #FFFF00;
}
-->
</style>
</head>

<body>
<div id="body">now what
  <div id="content">
    <p>So as you can see I just cant get the black DIV to flow around and expand with the yellow DIV</p>
  </div>
</div>

</body>
</html>

Last edited by TreyeMe; 07-27-2008 at 08:13 PM.. Reason: ADDED A VISUAL
TreyeMe is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-27-2008, 08:09 PM Re: CSS Expanding Nested boxes?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Are you using absolute positioning ?
__________________
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 07-27-2008, 08:14 PM Re: CSS Expanding Nested boxes?
TreyeMe's Avatar
Experienced Talker

Posts: 49
Name: Mike
Location: NY
Trades: 0
I edited my post to maybe make a bit more sense....Thanks for the quick response!

Refer to the example above
TreyeMe is offline
Reply With Quote
View Public Profile
 
Old 07-28-2008, 04:44 AM Re: CSS Expanding Nested boxes?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,515
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
position #content relative to #body

absolute positioned element are taken out of the document flow, so do not have any effect on other elements (including their container)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-30-2008, 06:41 PM Re: CSS Expanding Nested boxes?
TreyeMe's Avatar
Experienced Talker

Posts: 49
Name: Mike
Location: NY
Trades: 0
Perfect thanks!
TreyeMe is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS Expanding Nested boxes?
 

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.43150 seconds with 12 queries