How do I stop 2 divs from overlapping?

piqueen314

I want the the smaller div to be right below the bigger red div, but I can't figure it out. I thought that display block css would place the smaller div below the bigger div, but that does not seem to work.

I can't post an image. Here is a link http://s1.postimg.org/pzgvqi8y7/Capture1.jpg

Here is the html

<!DOCTYPE html>
<html>
    <head>
        <title>Select Ye Favorite</title>
        <link rel='stylesheet' type='text/css' href='css/list.css'/>
        <link rel="stylesheet" type="text/css" href="jquery.imgareaselect-0.9.10/css/imgareaselect-default.css" />
        <!--jquery and jquery UI scripts here -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
        <!--js pdf stuff -->
        <!-- <script type="text/javascript" src="jspdf.js"></script>    -->
        <script type="text/javascript" src="dist/jspdf.debug.js"></script>
        <script type="text/javascript" src="libs/FileSaver.js/FileSaver.js"></script>
        <script type="text/javascript" src="jjspdf.plugin.standard_fonts_metrics.js"></script>
        <script type="text/javascript" src="jspdf.plugin.split_text_to_size.js"></script>
        <script type="text/javascript" src="jspdf.plugin.from_html.js"></script> 
        <!-- photo selection scripts-->
        <script type="text/javascript" src="jquery.imgareaselect-0.9.10/scripts/jquery.imgareaselect.pack.js"></script>
        <!--my scripts-->
        <script type='text/javascript' src='js/list.js'></script>
    </head>
    <body>
        <div id='header'><h1 id='titleSite'>List Life</h1></div>
        <div id='list'></div>
    </body>
</html>

Here is the css

![html, body
{
    height: 100%;
}
/*
* {
    border: 2px solid black;
}*/
#header{
   /* z-index:1;
    border-radius:5px;
    background-color:#ECF7C6;
    height:60px;
    position:fixed;
    margin-top:-20px;*/
    z-index: 0;
    position: fixed;
    width: 98.75%;
    margin-top: -2%;
    margin-bottom:0.5%;
    margin-left:0.25%;
    margin-right:0.25%;
    height: 100px;

    border: 2px dashed black;
    background-color:#FC3F4D;
    border-radius:5px;
}
div{height: 50px;
    width: 100px;
    border: 2px solid black;
    border-radius: 5px;
    margin:auto;
    display:block;
    position:relative;

}
div  #titleSite{
    position:relative;
    top:10%;
    color:white;
    text-align:center;
    font-family:Arial,sans-serif;
    font-weight:bold;
    border: 2px dashed white;
}][2]
Sumit Raghav

its happens because of position:fixed of your #header If you do not want to change this just add the following css

#header{
  top:0px;
}
#list{ 
    margin-top:100px;(height of your header + gap between both divs)
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Stop floating DIVs from overlapping

From Dev

Beginner's stuff: How to stop CSS' Divs from overlapping?

From Dev

How to stop these two divs/navbars from overlapping in Bootstrap

From Dev

How to stop these two divs/navbars from overlapping in Bootstrap

From Dev

How to prevent divs from overlapping?

From Dev

How do I stop right floated DIVs from pushing each other around, but only within a particular area?

From Dev

How can I stop animated divs from moving place

From Dev

How can I stop animated divs from moving place

From Dev

How can I stop these buttons overlapping?

From Dev

How to stop <li> elements from overlapping?

From Dev

How do i stop the variable from resetting

From Dev

How do I stop it from looping endlessly

From Dev

How do I avoid flash message div from overlapping

From Dev

How do I avoid flash message div from overlapping

From Dev

CSS Positioning: How to make 2 overlapping divs and then 1 more div to the right of the overlapping divs

From Dev

Stop div from overlapping

From Dev

How can I stop my center div from changing position after I SlideUp another divs?

From Dev

How can I stop my center div from changing position after I SlideUp another divs?

From Dev

How to stop this webpage divs from resizing

From Dev

Nested divs: how can I get overlapping borders?

From Dev

How do I stop JS query hiding all divs on page when select box option is made?

From Dev

How do I stop Tidy2 from adding additional HTML tags? (Notepad++)

From Dev

Symfony2 and PHP affected by DST, how do I stop this from affecting me?

From Dev

How do I stop Apache2 from automatically starting on boot?

From Dev

How do I stop Excel from rounding numbers when format has been set to number and to 2 decimals?

From Dev

How do i show only 2 divs at a time onclick

From Dev

How do I center 2 divs in HTML Bootstrap?

From Dev

How do I horizontally align 2 divs inside a parent div

From Dev

How do I stop columns from stacking as I resize screen?

Related Related

  1. 1

    Stop floating DIVs from overlapping

  2. 2

    Beginner's stuff: How to stop CSS' Divs from overlapping?

  3. 3

    How to stop these two divs/navbars from overlapping in Bootstrap

  4. 4

    How to stop these two divs/navbars from overlapping in Bootstrap

  5. 5

    How to prevent divs from overlapping?

  6. 6

    How do I stop right floated DIVs from pushing each other around, but only within a particular area?

  7. 7

    How can I stop animated divs from moving place

  8. 8

    How can I stop animated divs from moving place

  9. 9

    How can I stop these buttons overlapping?

  10. 10

    How to stop <li> elements from overlapping?

  11. 11

    How do i stop the variable from resetting

  12. 12

    How do I stop it from looping endlessly

  13. 13

    How do I avoid flash message div from overlapping

  14. 14

    How do I avoid flash message div from overlapping

  15. 15

    CSS Positioning: How to make 2 overlapping divs and then 1 more div to the right of the overlapping divs

  16. 16

    Stop div from overlapping

  17. 17

    How can I stop my center div from changing position after I SlideUp another divs?

  18. 18

    How can I stop my center div from changing position after I SlideUp another divs?

  19. 19

    How to stop this webpage divs from resizing

  20. 20

    Nested divs: how can I get overlapping borders?

  21. 21

    How do I stop JS query hiding all divs on page when select box option is made?

  22. 22

    How do I stop Tidy2 from adding additional HTML tags? (Notepad++)

  23. 23

    Symfony2 and PHP affected by DST, how do I stop this from affecting me?

  24. 24

    How do I stop Apache2 from automatically starting on boot?

  25. 25

    How do I stop Excel from rounding numbers when format has been set to number and to 2 decimals?

  26. 26

    How do i show only 2 divs at a time onclick

  27. 27

    How do I center 2 divs in HTML Bootstrap?

  28. 28

    How do I horizontally align 2 divs inside a parent div

  29. 29

    How do I stop columns from stacking as I resize screen?

HotTag

Archive