/    Sign up×
Community /Pin to ProfileBookmark

scaling empty divs to height:100% – not working…

I have been trying to get empty divs to scale 100%. They
only seem to gain size based on how much content they have in them.
Since these particular ones are either empty or have nested divs, their
content is nil, so they display as nil.
Any ideas?

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterSep 27.2005 — Nest your DIV with 100% width inside of a DIV that has an absolute width e.g pixels. If your entire page uses percentage, just nest all of your content within a container DIV with an absolute width. JavaScript is very handy when it comes to resolutions -- screen.width and screen.height. All you'd need to use JavaScript for would be to resize the top-most container DIV to the correct absolute width. Even if the user has JavaScript disabled, your container DIV should have a default resolution for the DIV.
Copy linkTweet thisAlerts:
@felgallSep 27.2005 — Sometimes adding overflow:hidden helps to get the browser to pay attention to height entries.
×

Success!

Help @ubergrafik 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.23,
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,
)...