How to add space between DIVs?

后端 未结 5 926
我在风中等你
我在风中等你 2021-01-13 15:05

I have a WordPress generated page where I want to place AdSense below the header of the page. See image at http://imgur.com/WPXeG

I want to create some white space

相关标签:
5条回答
  • 2021-01-13 15:30

    Add a margin-bottom to the div with id "access"

    0 讨论(0)
  • 2021-01-13 15:39

    put in your css

    #access {
      margin-bottom: 5px; /* or whatever */
    }
    
    0 讨论(0)
  • 2021-01-13 15:42

    I added margin-top: 5px on the <ins> element inside the div and it work. If you could add an id to the div you use this css rule:

    div#adds > ins{
        margin-top: 5px;
    }
    
    0 讨论(0)
  • 2021-01-13 15:54

    Your #access div has float:left; on it, so you will need to add clear:left (or clear:both) on the div containing the ad, so they don't overlap.

    If you look at your page with Firebug, or the developer tools in your favorite browser, you can see that your ad div actually sits above and layered below your header divs, and when you add clear: both, it will move down to where it should be.

    0 讨论(0)
  • 2021-01-13 15:55

    Have you tried adding the following

    <div style="clear:both;"></div>
    

    after the header div?

    This way the header float (if it had a float) is cleared and the Ad div below should now utilise the padding

    0 讨论(0)
提交回复
热议问题