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.

Space between Div's in IE7

Featured Replies

Hi,

Im just started this site but for some reason im getting a space between the #header and #nav div's (only in FF3)

It displays correctly in IE7

 

Clicky

 

I want it to display as it is in IE7. Where there is no space between the two Div's.

 

Thanks in advance

 

(Bet this is something simple and silly.....!)

Try adding margin-top:0; padding-top:0; to your #nav ul declaration in the CSS. Not tested but sometimes top margins can pull their container down with them.

  • Author
Try adding margin-top:0; padding-top:0; to your #nav ul declaration in the CSS. Not tested but sometimes top margins can pull their container down with them.

 

Nope didnt work?

Ive never had this happen before. I hate these little niggly problems. Perhaps im just having a bad day!!

Nope didnt work?

Ive never had this happen before. I hate these little niggly problems. Perhaps im just having a bad day!!

 

I think ZigPress is on the right track, as a test add this (below) to the top of your css file.

 

* {margin:0; padding:0; }

 

If that works then you should read about "CSS Reset's" and the correct way to do it.

  • Author
I think ZigPress is on the right track, as a test add this (below) to the top of your css file.

 

* {margin:0; padding:0; }

 

If that works then you should read about "CSS Reset's" and the correct way to do it.

 

That worked thanks! I dont know alot about CSS Resets as of yet and can see that it has altered things on my whole page.

Should not be a problem tho. as i can just add margins/padding as necessary, right?!

That worked thanks! I dont know alot about CSS Resets as of yet and can see that it has altered things on my whole page.

Should not be a problem tho. as i can just add margins/padding as necessary, right?!

 

 

Yes thats correct, im glad it worked.

 

Basically it is a wild card removing all defult padding and margin, each brouser will add its own ammount of padd/margin to some elements, this causes alot of cross brouser problems.

 

The general principle behind using a reset is to use a list of elements rather than using the wildcard, i use the following:

 

html, body, div, h1, h2, h3, ul, li,p, blockquote, pre, form, fieldset, table, th, td { margin: 0; padding: 0; }

 

you can read about them on nettuts here or do a google search for css reset.

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.