开发者

How do you develop for a 1024x768 resolution?

开发者 https://www.devze.com 2023-03-05 20:43 出处:网络
Hey everyone, I hope I\'m asking this question in the right place and I apologize in advance if it\'s not. I\'m completely new to making websites and am still very much in the process of learning. My

Hey everyone, I hope I'm asking this question in the right place and I apologize in advance if it's not. I'm completely new to making websites and am still very much in the process of learning. My question isn't anything coding specific, but what I want to know is what are the general guidelines I should follow for making a site fit into a 1024x768开发者_JAVA技巧 resolution? For example, working in percentages rather than pixels. I'm currently working on a 15inch macbook pro at a 1440x900 resolution for reference if that matters. I hope this isn't a completely vague question, and thank you in advance for any help.


This very much depends on the type of website you want to make. When you are learning, the best way is to look at other sites that look and feel similar to what you're trying to achieve and have a look at their CSS. Don't copy their CSS outright, but try to understand how they implement different parts of the design.

Generally though, since you are going the fluid layout route (the best way for a generic site IMO), is to provide relative values for widths etc., and follow that up with absolute values for the min/max values for width etc. For example you may have something like the following for some container div in your design:

div.contentbox
{
   width:80%;
   min-width:800px;
   max-width:1280px;
}

You may have to look at floating divs to make sure they stay aligned to the edges at different browser sizes, you may want to look at keeping things centred using margin:auto.

There are loads of tricks you generally go through to keep a site looking same-ish in different browser sizes. The best thing for you is to start making it, and and when you have a specific problem, google it (someone's bound to have faced a similar problem in the past), and if you got nowhere or need a bit more help, ask here.


Google around for the "960 design": you're not alone if you fix your website content width to 960 pixels, which will fit nicely in 1024x768 screen resolution.

The other option is of course to generally use "fluid" layouting where the site will look nice on any resolution.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号