Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ text overflowing

Posted by: Kaged May 4 2012, 08:55 AM

hey, im new to web design and i have a problem.
in my school we use iMacs when i coded the website. when i try to view it on my PC at home. the website is different, some textbox move abit. but my main problem is that some text go out its div tag. and oh, it also differs from browser to browser.

http://caweb.matcmadison.edu/students/Spring2012/KAlfafara/FarmersMkt%20WEBSITE/shop.html

how do i fix that?

Posted by: pandy May 4 2012, 11:56 AM

Don't limit the height of boxes that contain text. It's enough to use a larger text size in the browser to break it (note, text size, not page zoom!). You can't know what text size your visitors prefer, what resolution they have, how big browser window - you can't know how big an area the text will occopy. If you limit both width and height of a text box the text has nowhere to go when it needs more room than the box provides, so it overflows.

Posted by: Kaged May 4 2012, 09:45 PM

ok. thanks for the advice. but, how do you do that?

Posted by: pandy May 5 2012, 04:35 AM

Don't specify a height and the box will expand to fit the text.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)