![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Mar 2009
Location: Liverpool
Posts: 7
OS: XP SP2
|
Help with CSS and layouts
Hi
Im currently learning CSS and i need some help with the layout of it, when i change the resolution it expands or shrinks. I was wondering can someone point me in the right direction about keeping my work the same in all resolutions. Thanks in advance James |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Moderator, TSF Articles
|
Re: Help with CSS and layouts
Use % instead of px in your width: tag.
width:100% That will make the page fit 100% of the users screen. Obvilously you will need to do that for everything on your page, such as the header and any other elements. |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Sep 2007
Location: Derbyshire, UK
Posts: 85
OS: Windows Vista
|
Re: Help with CSS and layouts
Hi,
From what I read, the problem seems to be that he is using % instead of px in the width tags? If you want to keep your work the same in all resolutions, then you want to be using a px value instead of % don't you? I may have mis-understood, in which case, sorry. Regards, Craig EDIT: Actually, I think i did mis-read! Sorry! Last edited by craigs85; 04-06-2009 at 09:43 AM. |
|
|
|
|
|
#5 (permalink) |
|
Registered User
|
Re: Help with CSS and layouts
Allow me to clarify for craigs85:
The OP wants his site to remain proportionally the same in length and width regardless of the resolution or size of the user's window. The only way to accomplish this is with % units instead of px units, as px units are fixed, whereas % units take into account the width of the browser window. Another alternative (one that sites such as Gamespot frequently use) is centering fixed-width content so that the "smallest" popular resolution (800x600) can view it, and the largest resolutions get some nice background real estate on the left and right of the content. It depends on what type of content you have on your page. If you'll have lots of Flash and other unscalable/unstretchable stuff, you're better off with the center fixed-width approach; if you just have text and scalable media, then the % method should work fine. If you're using CSS, I'm assuming you won't have too much Flash or unscalable stuff; in that case, % should do you just fine. Be sure to do your math right though, I can't count how many times I've seen pages with various parts whose widths add up to 110%. :P
__________________
I'm ridin' dirty. Oh baby, I'm yellow and nerdy. |
|
|
|
![]() |
| Thread Tools | |
|
|