Forum Moderators: not2easy

Message Too Old, No Replies

Positioning Text with CSS no matter what the Screen Resolution may be.

positioning content using css

         

as71977

9:10 pm on Jan 8, 2008 (gmt 0)

10+ Year Member



I'm sure that this has been asked several times before but I just can't find an answer that makes sense. I'm pretty new to using css and being a novice with this I was hoping to get some help.

I'm trying to build a site and position images, content, and navigation with using only css. I have everything positioned exactly as I want it if I'm viewing the site in 1024x768 but all other resolutions cause the site to go crazy.

Is there a way to keep the position of text, images, and navigation in the right place no matter what the resolution is?

Xapti

6:18 pm on Jan 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, somewhat, but it's generally not a good idea. (It would consist of absolutely positioning all elements on the page, as well as using percentages for all coordinates and sizes of all absolutely positioned elements)
What you seem to be trying to do is an absolute positioning based layout. Absolute positioning is not a very good idea for web page design, because it doesn't flow well with content (it doesn't flow at all... you'll likely end up with a bunch of scroll bars for each content box)), and can be a huge hassle to redesign or modify.
Generally, all you need to do is use ems for font sizing, so that you get the browser's setting (which can be set by the user, depending on his resolution), and then set width of a few elements like sidebars with ems as well, so that the text can always fit properly without causing overflow issues. The rest of the space would be good to just leave open and flexible, isntead of fixed-width, so that you can incorporate any size of content into the page without problems, but specifying a fixed with, or max width of 1000px (or even a certain amount of ems) would also work, if you wanted.

as71977

8:48 pm on Jan 9, 2008 (gmt 0)

10+ Year Member



Thanks, I was afraid that might be the case. I really appreciate the info on this...