Jump to content
Fórum Script Brasil
  • 0

Posicionar DIV dentro de outra DIV com css


cmdmss

Question

Prezados colegas, bom dia.

Tenho uma div principal, e dentro desta, outra div(secundaria).

estou tentando posicionar a div secundaria na div principal. Quero colocara por exemplo a 10% abaixo do topo da div principal, eu seto o CSS para top:10% mas ela não vai!

Segue abaixo codigo.

<div id="DivPrincipal">
                    <div id="IntDiv1">
                        <table align="left">
                        <? 
                           echo "<tr><td>De ".mostraData($x->dataIni)." a ".mostraData($x->dataFim)."</td></tr>";
                           echo "<tr><td>".$x->local." / ".$x->cidade." - ".$x->estado."</td></tr>";
                           echo "<tr><td><table><tr><td>FALTAM</td></tr><tr><td>X dias</td></tr></table></td></tr>";
                        ?>                        
                        </table>                        
                        <div id="divInt2">
                            <table>
                                <tr><td>Lista de Inscrições</td></tr>
                                <tr><td>
                                    <table>
                                        <tr><td>Inscrição</td><td>Nome</td><td>CPF</td><td>Email</td><td>Celular</td></tr>
                                    </table>
                                </td></tr>
                            </table>
                        </div>
                    </div>
                </div>
e no css
#DivPrincipal{
                position: relative;
                width: 800px;  
                z-index:1;
                top: 10%;               
                border: 1px solid black;
                border-radius:11px;
                background-color: white;
                overflow: auto;
                
            }

#divInt2{
                position:relative;
                top:30%;
            }

alguém pode me dar a luz no fim to tunel?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...