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.

20px Margin

Featured Replies

Im getting a 20px margin at the bottom of my page, and cannot figure it out, html and body both have margin:0; padding:0;

It's your float clearing stuff that's mucking you up. All those rules at the bottom of defaults.css.

 

IMO you should be doing float clearing by setting overflow:auto;

 

http://www.quirksmode.org/css/clearing.html

 

The only gotcha is to make sure haslayout is triggered for the element in IE6, which can usually be achieved by setting a width or height on the element, or failing that an IE specific rule such as zoom:1;

 

Anyway, that's beyond the scope of your problem - but it definitely looks like the .clear-block selectors that are causing the extra space.

  • Author

Thanks for the quick reply, helped me see the problem. This clear-block style is built into drupals default css and it was the

clear-block:after { content:'.'; }

that was causing the margin.

 

Ive overridden it on two containers with .clear-block class like this:

 

 

#footer-region:after {content:'';}
#page:after {content:'';}

 

and that fixed the problem.

 

Thanks for your insight.

 

 

Changed to

overflow:hidden;

and works better in other browsers.

that fixed the problem.

 

Thanks for your insight.

 

No worries, I'm pleased you got it sorted :)

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.