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.

loosing margin

Featured Replies

I having some problems with loosing margins in ie both times it after a list that I've used block and float left I cant see what causing it ?

 

Its probably something simple lol

 

In ie7 on this one I loose the margin between the footer and pictures

 

and in ie8 on this one I loose the margin between the top navbar and my name<h1> I fixed this by adding   into my clear div but on ie7 theres a gap under the footer aaargh lol

 

tia Jack

If you losing your margin then you can just make a seperate stylesheet for ie.

  • Author

I think I've fixed the 2nd one now added to my clear {line-height: 0xp; font-size: 0px; border: none;} hope thats done the trick

 

can anyone test it for me thanks

Like this

 

<!--[if IE 6]>

<link rel="stylesheet" type="text/css" href="css/iestyle.css" />

<![endif]-->

When you float an element (or multiple elements) without clearing the space, you will lose margin, and your background wont wrap around the elements. To avoid this, I always do this:

 

<div id="element-with-background-containing-floating-elements">

    <div class="float-left"></div>
    <div class="float-left"></div>

    <div class="clearfix"></div>

</div>

 

My CSS for the clearfix is this:

 

.clearfix{
    display: block;
    clear: both;
}

 

That does the trick every time.

 

+1 me if I helped! :lol:

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.