Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10
Like Tree4Likes
  • 4 Post By Ronald Roe

Thread: Convert pixels to % ?

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    7
    Member #
    36717

    Question Convert pixels to % ?

    pixels to % ?

    250px = ... % ?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    It equals 250 pixels. The percentage depends on the width of the container that 250 pixels is a child of. If there is no container, then it's relative to the width of the user's screen.

    So to answer your question, there is no percentage answer.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    42. The answer is 42.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  5. #4
    Member Cranavvo's Avatar
    Join Date
    Sep 2013
    Location
    St. Helens, England
    Posts
    70
    Member #
    37189
    Liked
    11 times
    Quote Originally Posted by Ronald Roe View Post
    42. The answer is 42.


    And Game always beats my answer.

  6. #5
    Junior Member Acamapichtli_Design's Avatar
    Join Date
    Sep 2013
    Location
    South Africa
    Posts
    16
    Member #
    37227
    Liked
    4 times
    It's relative as said, for use of conversion though, you can try to calculate using your own resolution, say for example you have a 1080p monitor, if in fullscreen the width of that would 100% or 1080px, to get half of that, just use a calculator, the great thing about percentages is that they tend to across resolutions, albeit not always perfectly, that's why you use media queries as well, it helps for scaling with different resolutions and devices.

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    1080p refers to height (horizontal lines), not width, dude. Other than that, good thoughts.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Junior Member Acamapichtli_Design's Avatar
    Join Date
    Sep 2013
    Location
    South Africa
    Posts
    16
    Member #
    37227
    Liked
    4 times
    Oh yeah, sorry, width would be 1920, height would be 1080 my pardon lol.

  9. #8
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    heh no worries. That's why pencils have erasers and keyboards have BackSpace keys, right?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  10. #9
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    There are a couple of online converters that do the math for you and also show you graphically what the layout will look like.

    http://responsv.com/flexible-math/

    PixelPerc - A simple tool to help build responsive websites
    Last edited by AlphaMare; Sep 24th, 2013 at 06:50 PM.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  11. #10
    Senior Member RDesignista's Avatar
    Join Date
    Feb 2012
    Location
    Coconut Tree City
    Posts
    822
    Member #
    30921
    Liked
    123 times
    If you're making a 960px width website or a pixel perfect website, % is not that useful for layouts IMO.

    % is more handy when it comes to responsive designs, where elements can grow and shrink. Width, height, padding, margins can all be listed as %.

    But img { max-width:100%; height:auto } is quite a useful bit of CSS to have, no matter what you're working on. (if the image width exceeds it's container width, the image will shrink proportionately to fit, unless another CSS is overriding).


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:42 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com