/    Sign up×
Community /Pin to ProfileBookmark

Real ***** of a layout.

An extremely simple design, yet seemingly completely impossible.

[url]http://www.dootdootdoodydoodydootdoodoooo.com/blam/index.php[/url]

Ok. So there’s the container div ( max-width:900px; ). Then the nav list (automaticly self sizing dependent on the length of the string in the largest <li>). Then another div to house two other divs. One set to 60% of its parent div and the other set to 40% of its parent div (I’ll sort the padding and margins later down the line). Only trouble is, the child divs won’t take the percentages of their parent unless the parent has been given a specific width.

As you can see, the child divs are taking 60 and 40 percent of the 900px. As if the parent div didn’t realise that list was there and thought its natural width would be 900px (the max width of the container). This is evidenced by giving #nav {display:none;}. Once the menu is removed, the child divs make a perfect fit.

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@toicontienNov 01.2004 — Your link just goes to a plain looking page with no DIV tags ?
×

Success!

Help @Stephen_Philbin 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.1,
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,
)...