View Full Version : CSS / HTML % problems

05-29-2007, 01:05 PM

I have just created a site:

Now I used the percent value in positioning elements and I think that it looks ok.
But when you resize the window the percent value seems to keep with the small window and all the links up the top become entangled.
Is there a way to stop this from happening so that when you resize the window the text stays to the right like when you resize a pixels based code.
eg. www.thecainfoundation.com


05-29-2007, 07:23 PM
The best thing to do would be to build the site with the text resizing expansion in mind in this case, specifically, when resizing the text the tabs of the navigation don't expand with it so the links break their container and overlap each other.

A good tutorial on how to build expanding tabs is ALA's Sliding Doors of CSS (http://alistapart.com/articles/slidingdoors/), hopefully that helps a bit.

Other than that, just remember that any positioning based on pixels will not increase if the text is resized; positioning based on percentages (or em) will. Andrew K. (mindlessLemming, a one-time forum-ee) has a great presentation on his site about building flexible layouts mixing fixed and proportionate widths: http://leftjustified.net/site-in-an-hour/