Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.

View Poll Results: When making a website, you should use _______ Width/Height?

Voters
1. You may not vote on this poll
  • Percentages - Always

    0 0%
  • Fixed - Always

    0 0%
  • It depends on what your doing.

    1 100.00%
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2010
    Posts
    432
    Thanks
    56
    Thanked 1 Time in 1 Post

    Fixed width/height or Percentages?

    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

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,428
    Thanks
    11
    Thanked 302 Times in 301 Posts
    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

  • Users who have thanked tracknut for this post:

    MrTIMarshall (08-02-2012)

  • #3
    Regular Coder
    Join Date
    Nov 2010
    Posts
    432
    Thanks
    56
    Thanked 1 Time in 1 Post
    Quote Originally Posted by tracknut View Post
    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!

  • #4
    New Coder
    Join Date
    Apr 2012
    Posts
    84
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •