Create a div that contains other divs inline

0

I need help creating a div that can include other horizontal divs. The goal is to create a space at the top of the site header. Can someone help me?

<div id="header">
        <div class="top_header">        
            <!-- SELECT YOUR LANGUAGE -->
                <div class="linguagem" onclick="abrirlayer('layer1')">
                    <h1>SELECT YOUR LANGUAGE v</h1>
                </div>
            <!-- SELECT YOUR LANGUAGE -->
            <!-- PESQUISA -->                                                                                                           
                <div class="pesquisa">
                    <form action="action_page.php">
                    <input type="text" name="pesquisa" class="caixatexto">
                    <input type="image" value="submit" src="imagens/lupa.png" alt="submit Button">  
                </div>
            <!-- PESQUISA -->

        </div>
</div>


#header .top_header{
    background-color: blue;
    width: 100%;
    height: 25%;
    position: relative;
    margin-top: -0.6em;
    white-space: nowrap;
}
.top_header .linguagem{
    background-color: green;
    height: 100%;
    width: 15%;
    position: relative;
    cursor: pointer;
    display: inline-block;
}
.linguagem h1{
    position: relative;
    padding-top: 5%;
    padding-left: 2%;
    font-size: 1vw;
    text-align: left;
    color: rgb(225,225,225);
}
.top_header .pesquisa{
    background-color: yellow;
    height: 100%;
    width: 15%;
    margin-left: 50%;
    position: relative;
    cursor: pointer;
    display: inline-block;
}
.top_header .pesquisa form{
    position: relative;
    height: 100%;   
}
.top_header .pesquisa img{
    position: relative;
    height: 100%;
}

    
asked by anonymous 14.05.2016 / 22:36

1 answer

0

Your question was not very clear, but I think you might want something like this:

Todothis,simplycreateadivwithintheotherwithposition:relative,forexample:

CSS:

#box1{position:relative;width:300px;height:110px;margin-left:15%;border:1pxredsolid;top:0px;background-color:orange;}#box2{position:relative;width:300px;height:110px;margin:0auto;margin-left:350px;border:1pxredsolid;top:0px;background-color:blue;}#box3{position:relative;width:300px;height:110px;margin:0auto;margin-left:350px;border:1pxredsolid;top:0px;background-color:black;}

HTML:

<html><linkrel="stylesheet" type="text/css" href="teste.css"> 
    <body>
    <div id="box1"> 
        <div id="box2"> 
            <div id="box3"> </div>
        </div>
    </div>
    </body>
</html>
    
16.05.2016 / 16:59