/    Sign up×
Community /Pin to ProfileBookmark

Make an element "not-occupying" space

Imagine that i want to create a background image without set it into the html,body rules, but declaring it as a <div>
The problem is that this div will occupy the entire page and subsequent elements will go under it (out of page). So, it’s would useful to make the background a “not-occupying” element, so that other elements can use his space.

There is a special rule in the css for do that? Hiding an element, it’s possibile to set “display:none” rule, but is it possibile to do a similiar thing with the element regularly displayed?

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@COBOLdinosaurMar 06.2013 — Of course not it would be totally illogical. You either display or you don't if it is a background, the set it as the background; otherwise you are just wasting your time trying to re-invent CSS.
Copy linkTweet thisAlerts:
@American_horizoauthorMar 06.2013 — i've done the exemple with background for take an "extreme" situation, with an element that occupy the entire page..
Copy linkTweet thisAlerts:
@COBOLdinosaurMar 06.2013 — The example is irrelevant. What you are asking for is not logical. An element cannot be in two mutually exclusive states at the same time. It either displays or it does not. If it displays then it must either be the background for a declared entity or the content of a declared entity.

It is a waste of time to explore it any further.
Copy linkTweet thisAlerts:
@American_horizoauthorMar 06.2013 — So, for overlap elements it's only possible to set it in an absolute position?
Copy linkTweet thisAlerts:
@COBOLdinosaurMar 06.2013 — absolute or fixed.
×

Success!

Help @American_horizo 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.29,
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,
)...