The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
Should we use % or px for setting widths on elements?
Discuss Should we use % or px for setting widths on elements? in the CSS Help forum on Dev Shed. Should we use % or px for setting widths on elements? Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

December 6th, 2012, 03:36 PM
|
 |
Contributing User
|
|
Join Date: Aug 2011
Location: The Pleiades
|
|
Quote: | Originally Posted by Kravvitz Supporting multiple screen resolutions does take more work. Fortunately CSS3 Media Queries make it easier than it used to be, though of course there are many more web-enabled phones and tablets than there used to be too. These days, it seems many sites are designed to work with 3 or 4 different screen size ranges.
I'll be around when you have questions.  |
I already had one in mind!
When setting widths on elements (not text elements), what value should we use % or px? (keeping in mind supporting multiple screen resolutions).
I can have my site look wonderful on my machine, I ask someone to view it with a higher res and things are misaligned, 'jumping out of place' etc. In the site I am currently building I have set all my margins and widths using % (thinking it will span all/most resolutions the same).
Half the trouble is, my highest resolution I can go to is 1280x800. It seems to get worse as it goes higher, so my 'testers' have told me
Would you possibly be able to take a quick look at it for me in a higher resolution?
Site is located: Nanomech's site
Kind regards,
NM.
Last edited by Kravvitz : December 6th, 2012 at 05:05 PM.
Reason: fixed the link
|

December 6th, 2012, 04:25 PM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
|
Last edited by Kravvitz : December 6th, 2012 at 04:27 PM.
|

December 6th, 2012, 05:00 PM
|
 |
Contributing User
|
|
Join Date: Aug 2011
Location: The Pleiades
|
|
|
Thank you so much for all them links. It will definitely be a loooon g night. I think the site you saw earlier this week was the old version, I've totally re-designed the back end and use db for a lot of the content.
I have just visited the link in my other post 3 times and it seemed to load the page ok.
Is that the whole message? I only ask because it seemed earlier, if I clicked the links too quickly, it showed me a blank page with 3 error messages. Next time it happens I'll copy and paste it just to check it against yours.
Regards,
NM.
__________________
"WERE NOT WORTHY!"
"WERE NOT WORTHY!"
|

December 6th, 2012, 05:21 PM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
Your site is available again. "flowerbed.fw.png" looks odd when stretched to 909px in width. I would suggest giving a max-width of the image's width to "#navigation_div".
I'm glad to see you're using a min-width on "#container", however, at that minimum the left column seems a little too narrow.
By the way, paragraphs that have centered text can be difficult to read. It's best to use "text-align:left" for them (assuming ltr, left-to-right, text).
I'm curious, is there a particular reason why you're using XHTML 1.0 Transitional? Did you notice that your page has a random </noscript> end tag?
Quote: | Is that the whole message? I only ask because it seemed earlier, if I clicked the links too quickly, it showed me a blank page with 3 error messages. Next time it happens I'll copy and paste it just to check it against yours. |
Which message? Perhaps you saw my post before I changed the links to archive.org's copy of each page. If you wait a little they should redirect to show the article.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|