Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > expandable pages?

expandable pages?
Thread Tools
iranfromthezoo
Senior User
Join Date: Feb 2005
Location: Mississippi
Status: Offline
Reply With Quote
Jul 11, 2006, 08:59 AM
 
Hey guys I did a search but turned up nothing. I know somewhere we talked about pages that were expandable to the users resolution. I was wondering if you guys knew how to do that or if you could provide a link to a tutorial. I did a google search but most them were trying to sale something to do with css or they were css generators.

thanks guys
     
SirCastor
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status: Offline
Reply With Quote
Jul 11, 2006, 05:42 PM
 
you can set your css elements sizes to the em unit, which is based on the current set font size. If a user scales their font, the elements scale as well.
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
     
Chris Graham
Fresh-Faced Recruit
Join Date: Jul 2006
Status: Offline
Reply With Quote
Jul 14, 2006, 03:12 PM
 
Well, by default pages do expand to the users resolution. Pages only don't do it when they're made "fixed width", but you have to go out of your way to achieve that by explicitly setting a width.
     
megasad
Grizzled Veteran
Join Date: Oct 2002
Status: Offline
Reply With Quote
Jul 15, 2006, 11:29 AM
 
Originally Posted by iranfromthezoo
Hey guys I did a search but turned up nothing. I know somewhere we talked about pages that were expandable to the users resolution. I was wondering if you guys knew how to do that or if you could provide a link to a tutorial. I did a google search but most them were trying to sale something to do with css or they were css generators.
For your whole site to behave how I think you want, define everything in em units instead of px or pt. Not just text, but image widths too.
BayBook (13" MacBook Pro, 2.4GHz Core 2 Duo, 4GB RAM, 1TB HD) // BayPhone (iPhone 4, 32GB, black)
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 17, 2006, 08:39 AM
 
What do you mean by "expandable"? Are you talking about pages where the user can resize the text freely? Any page can do that on most browsers (though sadly, not IE). For IE, you just have to be careful to never define your font sizes in px or any other "absolute" size; only use em, ex, and %.

Or are you talking about pages where parts of the layout (the main column of content, for example) expand to fit the user's window? In this case, the trick is to never define the width of the areas you want to be expandable: you can use margins and padding, and even min-width and max-width (though these two don't work right on IE), but don't use width.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:04 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,