Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to keep the layout a fixed size?

Featured Replies

i want to keep my site layout the same size, but since i am making it on my desktop screen it looks perfect, but if i go onto a small screen its massive, i want it to stay the same size no matter what screen it is on? otherwize only people with my size monitor will see it how it is suppost to be seen? how can i do this?

You could use percentages and auto stuff.

For the main container for example

#main{

width: 75%;

min-height: 50%;

margin:auto;

}

 

But it's not really recommended as there are things you can't use percentages for, like images(And i suppose you're not making a site without graphics).

I think the only solution to your problem is making the website on the most used screen resolution, and it will look pretty ok on most res's

If you want to keep your layout the same size in every browser

then i recoment you use px in the css definition.

 

for example

 

lets say you have a content in the html

 

<html>
<head>
</head>

<body>

<div id="wrapper">

  <h1>Hello world.</h1>

</div>

</body>
</html>

 

Then in the CSS:

 

#wrapper {
  width:800px; 
}

 

I used 800px as an example but a lot of people are designing up to 1024. I persnally

design my sites with a width of 960px.

 

Cheers

  • Author

why doesnt itauto ajust on diffent computers? so looks the sme on a 22" screen as a 19" so it stays a look exactaly the same on both screens

because different computers have different resolutions... some 800*600 high others 1024*768 high even as big as 1680*1050 high or bigger.

 

So if you are designing a site on a monitor that is 1680*1050 so you have made it 1680px wide, when displayed on a 1024*768 screen it will look huge as that only shows 1024 px;. So it isn't to do with the 22" or the 19" screens it is to do with the resolution that the monitor is set.

 

 

Best way to combat that is to use percentages rather than pixels and make your sites a liquid layout rather than a fixed one, that way different bits will adjust to fit. But the best practice for fixed width layouts is to not design to your monitors resolution but the lowest used one...which is 800*600 but as that isn't really used by that many people any more a lot of designers have moved to 1024*768, taking into account the scroll bars on a browser its normally best to design somewhere between 960px and 980px width, just to be on the safe side. That way you ensure that the design will fit on the majority of screen resolutions, and still look right.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.