PDA

View Full Version : How Do You Handle Text Overflow?


Teachable
04-28-2010, 04:22 AM
I'm not even sure "text overflow" is the correct term. You see, if I put alot of text on my page it pushes down past the bottom border of the background design/image I've set and the image starts repeating. It doesn't look so good. Is there a simple way to correct this?

DWcourse
04-28-2010, 04:31 AM
Use a background image that tiles seamlessly and it won't matter how long your content becomes.

Corrosive
04-28-2010, 05:59 AM
Basically don't set heights on any divs unless you have to. Let content dictate the height. From this and your other post you appear to be using absolute positioned divs or 'layers' to build your site. This is a bad idea generally because of the things you are experiencing. You should try and use relative or naturally positioned divs that grow with content and, more importantly, effect the divs around them to keep your design in tact.

Teachable
04-28-2010, 06:12 AM
Corrosive, this is probably a dumb question but what is a relative or naturally positioned div?

Corrosive
04-28-2010, 06:33 AM
Corrosive, this is probably a dumb question but what is a relative or naturally positioned div?

Not dumb at all and it is the concept that most new designers find the hardest to fathom out.

Very basically (and there is a lot more to say about it) Absolute positioning takes a reference from the top left of the browser window and then the position you give it is measurements from there. Folks tend to get caught out when they build a whole site on their screen and it all lines up nicely and then they look at a larger or smaller screen and it is a mess.

Relative/natural positioning is the main stay of a stable design as one div 'pushes' on another. They are relative to each other and so any movement or content can 'stretch' a div and, in turn, the divs around it.

Get your head round the 'box model' first; http://corrosiveonline.co.uk/tutorials_css_box_model.php

edbr
04-28-2010, 06:42 AM
Absolute positioning takes a reference from the top left of the browser window and then the position you give it is measurements from there.
unless the absolute positioned is in a positioned parent ' div then it will use the boundaries of that for its positioning . they are best used this way IMO

Corrosive
04-28-2010, 07:29 AM
unless the absolute positioned is in a positioned parent ' div then it will use the boundaries of that for its positioning . they are best used this way IMO

Agreed. I'd encourage anyone to learn full layout with relative positioning first and then learn absolute as and when you have a special need to use it.