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.

Divs wrong sizes

Featured Replies

I'm trying (again) to make a css design. I know there's loads of bugs in all browsers with css so i've been looking for a site which will give me a simple structure. I saw the topic with this. For some reason when i copy and paste the code and view it, the heights are all wrong for all browsers.

 

Can someone test it out for me? this is a copy of the code which looks different for me.

 

By the way, i made a copy of one of those templates with tables and tables take up pretty much exactly the same amount of space as divs do. I don't understand why 10 more bits make a difference when you have the hassle of browser bugs.

 

Thanks, Peter

Try changing your content id to:

 

#content { 
margin-left:210px;
width:540px;
min-height:500px; /* for modern browsers */
height:auto !important; /* for modern browsers */
height:500px; /* for IE5.x and IE6 */
background-color:#333333;
}

 

All I did was remove the 10px margin from the top.

  • Author

I just saw this comment:

 

IMPORTANT: In order to make this work you have to download http://csseasy.com/layouts/fixed/background_3.gif (copy past in your address bar) and place it in the same folder as this html file. DON'T HOTLINK to this file.

 

Don't think that's exactly a fix..Removing that margin did work though i think.

 

Thanks

 

(later)

 

I'm getting this problem i think that gif's supposed to fix. On opera and firefox, when the content div has content in which makes the div higher than the nav bar the margin between the content and footer is too big. Is there a better way to fix this than having a picture to fill the space?

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.