Log in

View Full Version : font size on resizing the page



cpeeyush
01-26-2009, 10:16 AM
i am designing a website in which i am using a photograph in the center and some text written on it and i am using size(width and height) in percentage for that image so that my image is re sized on the browser window resize but the problem is that my text is not resizing and remains of same size so comes out of the image and looking very odd. so pls tell me how can i resize my text also on browser resize.

thanks

jscheuer1
01-26-2009, 05:14 PM
Best solution, make your text an image and treat it in a similar fashion to the image, or just write it directly on the image using an image editing program. Make sure to backup your image first.

The reason why this is best is that via css alone, text size can bear no relation to window size and is completely user configurable in most browsers. So even if you were to link it up to window size (probably using javascript), the user could always change his/her settings or have a different setting than you think, so that the result would be other than expected.