/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Make side column fill up main body

Hey I’m trying to make [URL=”http://spencer-designs.com/Stor-it/”]this website[/URL] I’m working on be vertically fluid, and I can’t figure out how to get the side column on the right to vertically extend depending on how much content there is in the main <DIV>. Here is my CSS…

[CODE]/* Main */
#main {width: 745px; height: auto; border-bottom: 1px solid #b5d1ee; background: #eff7fa url(‘http://www.spencer-designs.com/Stor-it/global/images/main.gif’) repeat-x; overflow: hidden;}

/* Content */
#content {width: 475px; height: auto; float: left; background: transparent url(‘http://www.spencer-designs.com/Stor-it/global/images/contentShadow.jpg’) no-repeat top right;}

/* Column */
#column {width: 269px; height: auto; float: right; border-left: 1px solid #b5d1ee; background-color: white;}[/CODE]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@CentauriFeb 25.2008 — You cannot force the height of an element to take up remaining height, or to match the height of an unrelated element. But you can make it [B][I]look[/I][/B] that way. If the #main div has a white background, whilst the #content div gets the blue, you are part way there :[CODE]/* Main */
#main {width: 745px; height: auto; border-bottom: 1px solid #b5d1ee; background: [COLOR="Red"]#fff[/COLOR] url('http://www.spencer-designs.com/Stor-it/global/images/main.gif') repeat-x; overflow: hidden;}

/* Content */
#content {width: 475px; height: auto; float: left; background: [COLOR="Red"]#EFF7FA[/COLOR] url('http://www.spencer-designs.com/Stor-it/global/images/contentShadow.jpg') no-repeat top right;}
[/CODE]
If the #content div then had a right border the darker blue, and that border is trimmed from the shadow graphic, the illusion is complete.
Copy linkTweet thisAlerts:
@novemberGreyauthorFeb 25.2008 — Woohoo, it works! Thankyou!
×

Success!

Help @novemberGrey spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...