/    Sign up×
Community /Pin to ProfileBookmark

div height problem

I’m having a little issue with a div height I can’t figure out. I’ve got 2 div containers nested inside of another div. One is floated left the other right I think, but that’s not really important I don’t think.

The left div is a navlist, and the right div is the content. Basically, on some pages the navbar div ends up longer than the content div. This isan’t a big deal, but it looks a little funny. I just want the content div to extend to the same height as the navbar div if it’s taller. I thought since it was nested I would just have to add (height: 100%? to the styles for the content div, but that didn’t work. Any suggestions woudl be greatly appreciated. The code looks similar to this….

<div id=”content_box”>
<div id=”navbar”>Navbar stuff</div>
<div id=”content”> Content Stuff</div>
</div>

If you need any more info, let me know.

Thanks much.

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@toicontienAug 21.2006 — Read up on [url=http://alistapart.com/articles/fauxcolumns/]Faux Columns[/url]. It may be just what you want.
Copy linkTweet thisAlerts:
@jesseainskeepauthorAug 21.2006 — That isan't really what I'm looking for. I'm trying to not 'fake' any of the columns.

Does anyone else have any ideas?
Copy linkTweet thisAlerts:
@toicontienAug 21.2006 — You're basically stuck with that. DIVs don't have any relation to one another. Another method is here: http://www.alistapart.com/articles/negativemargins

You're not going to get the stretchy behavior with DIVs that you get with tables. But this is all I can help you with until we see all the HTML and CSS involved. A link to the page in question is preferable. If you don't have a link, you can upload the files in a ZIP file or post the code and upload a screenshot of what you're trying to accomplish.
Copy linkTweet thisAlerts:
@jesseainskeepauthorAug 21.2006 — Sure, some forums don't let you post links to sites and stuff, I wasn't sure if this was one of them.

The site is still in developmental stage, so colors and a few things still arn't finished. So don't laugh at me. ?

[URL]http://www.visitquadcities.townnews.com[/URL]

This is the main site. The only pages I've finished so far at the landing pages for the For Visitors, For Members and such at the top. Those are the pages in question so far. Some of them the content is longer than the navbar so they look fine, but a couple others it is the other way around. For example...

[URL]http://www.visitquadcities.townnews.com/for_members/welcome_for_members.php[/URL]

Any ideas would be greatly appreciated.
×

Success!

Help @jesseainskeep 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 6.18,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...