...

View Full Version : Fixed width/height or Percentages?



MrTIMarshall
08-02-2012, 11:45 PM
Hello,

I've got my self into a little dilemma to try and make my website more mobile friendly, browser friendly and screen size friendly.

I am not too sure where to use percentages or fixed with/height, if it depends on the content or whatnot. Some of my website is in percentages and some is fixed at this moment in time, however, I'm now confused.

If I don't use percentages on this container I'm using, it looks small on my big screen, but will look bigger on a smaller screen...

Bit of advice please?

Best Regards,
Tim

tracknut
08-02-2012, 11:51 PM
Typically the text parts of the site work well, while the images tend to be fixed in pixels. So I've opted for divs in percentage, with a max-width so they don't expand to an enormous size on a full screen large monitor. Then apply media queries to shrink the images at certain key boundaries (e.g. 10000, 600, 320px) as well as tailoring the css and removing some content as the display gets smaller.

Here's an example, feel free to look at the code: www.ncracing.org

Dave

MrTIMarshall
08-02-2012, 11:56 PM
Typically the text parts of the site work well, while the images tend to be fixed in pixels. So I've opted for divs in percentage, with a max-width so they don't expand to an enormous size on a full screen large monitor. Then apply media queries to shrink the images at certain key boundaries (e.g. 10000, 600, 320px) as well as tailoring the css and removing some content as the display gets smaller.

Here's an example, feel free to look at the code: www.ncracing.org

Dave

Wow, nice! I need to learn some of this...

I thought html and css was basic, I'm recently finding out that there is a lot more too it than meets the eye!

Vytfla
08-03-2012, 08:13 PM
In Ethan Marcotte's "Responsive Web Design' book it seems that all his width's are in %, while all his fonts are in em's. I believe he converts his top/bottom to em's as well, but I think pixels work for those.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum