Cetanu Posted June 24, 2009 Share Posted June 24, 2009 I have been using CSS for like 7 months now, mainly teaching myself. My biggest problem isn't cross-browser issues, it's cross-monitor issues! On my laptop the site looks one way, but on the desktop it looks all smushed or expanded. Any idea how I can fix this? I try to use % width so it is relative to the screen, instead of px. Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/ Share on other sites More sharing options...
xtopolis Posted June 24, 2009 Share Posted June 24, 2009 Think about your target audience and supported resolutions. It is very rare a site will look perfect in every scenario. % widths can be tricky, especially using CSS alone. I suggest you consider what target resolution(s) you want to aim for and cater to those first. If you want to try to handle all things, you could later use javascript to detect the screensize and change the stylesheet appropriately. It would be extra work however. Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-862440 Share on other sites More sharing options...
Cetanu Posted June 24, 2009 Author Share Posted June 24, 2009 You can use JS to change stylesheets?!! That's amazing... It would be a lot of work, however, I'll take your advice, but how am I supposed to know what it will look like in those resolutions if I don't have them? Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-862441 Share on other sites More sharing options...
Hybride Posted June 24, 2009 Share Posted June 24, 2009 Firefox has an add-on for that, I do believe so - Web Developer. Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-862443 Share on other sites More sharing options...
Cetanu Posted June 24, 2009 Author Share Posted June 24, 2009 Firefox is amazing!!! I'll look into that. Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-862673 Share on other sites More sharing options...
KevinM1 Posted June 24, 2009 Share Posted June 24, 2009 You can also set element sizes as resolution-dependent values - i.e., as ems instead of pixels. Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-862678 Share on other sites More sharing options...
Cetanu Posted June 24, 2009 Author Share Posted June 24, 2009 OH! That's what em's are for?! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-862787 Share on other sites More sharing options...
haku Posted June 25, 2009 Share Posted June 25, 2009 An em is a unit of size that is relative to the font size. So if the font size increases, the size of anything defined in ems also increases. Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-863136 Share on other sites More sharing options...
Cetanu Posted June 25, 2009 Author Share Posted June 25, 2009 Yep. I was looking through it and all, even began using ems, but instead I have decided to go back to a fluid layout using %. Quote Link to comment https://forums.phpfreaks.com/topic/163451-quick-question/#findComment-863154 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.