/    Sign up×
Community /Pin to ProfileBookmark

Why not "overuse" absolute positioning?

I read in a link someone (Kravitz?) had that said you shouldn’t “overuse” absolute positioning. My simple site has most of the divs positioned absolutely. The main div has a fixed width/height. Can someone give me a link or explain why using “position:absolute;” is a bad thing?

Thanks in advance.
CFH

PS: I know using position:absolute takes things out of the “page flow”, and if I were using relative positioning for other divs I could see that would be a problem, but…otherwise, I don’t see what the problem is. I thought absolute positioning was one of the great things about css.

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMar 22.2006 — One problem I sometimes see with sites that have lots of absolutely positioned elements is that they do not gracefully handle increases in font size by the user: the text in one element will overflow over another element because that second one is locked in place by absolute positioning and so does not adjust its position as the text takes up more space. This can also be problematic if you edit the content at some point, and find you now have to change your layout because you've increased the amount of content.
Copy linkTweet thisAlerts:
@CFHuttonauthorMar 22.2006 — Very helpful NogDog.

Not sure that factors in with my current site much, but certainly something to think about for the future. My current one handles 2 user forced font size increases without any problem, and a third with just a minor overlap of text on a bg graphic. After that, my buttons start really breaking.

Anyway, thanks for the reply. I'm trying to move beyond just "getting the job done" and into "getting it done the right way".

CFH
Copy linkTweet thisAlerts:
@drhowarddrfineMar 22.2006 — I see a lot of that "don't use AP" lately but I have no problems with its use as long as it works. Like anything, as long as it works then it isn't a problem. AP is a valuable tool. Yes, I'm aware of problems with resizing the browser but if resizing doesn't cause problems then no problem exists.
×

Success!

Help @CFHutton 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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