Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Keven Jesus_164006

position fixed

Recommended Posts

Olá tenho seguinte codigo ...

<div id="topconfig">	<div class="content">				<a href="dashboard.php" class="header-logo">			Viver e Sorrir		</a>		<a href="?sair=<?php echo $_SESSION['user_admin'];?>" class="pull-right">			Sair do sistema		</a>		<a href="#" class="pull-right">			Perfil		</a>		<a href="#" class="pull-right">			Visualizar site		</a>	</div></div>	<div class="box bgbranco">				<div class="sidebar">			<ul>				<p>Gerenciar</p> etc....

 

há topconfig ela ta fixed e tal porem a box que esta abaixo ... quando eu aplico margem top nela a topconfig desse junto ...

 

css : topconfig

#topconfig{width:100%;height:60px;background:linear-gradient(to bottom, rgba(51,51,51,1), rgba(0,0,0,1));position: fixed;}#topconfig .content{width:940px;margin:0 auto;}#topconfig .content a{float:left;color:#fff;font-size:13px;padding:21px;}#topconfig .content a:hover{text-decoration: underline;}#topconfig .pull-right{float:right !important;}#topconfig .header-logo{font-weight: bold;text-transform: uppercase;font-size: 25px !important;background: #069;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;-webkit-border-bottom-right-radius: 6px;-moz-border-bottom-left-radius: 6px;-o-border-bottom-right:5px;-o-border-bottom-left:5px;}#topconfig .header-logo:hover{text-decoration: none !important;}

css : box

.box{width:940px;height:auto;overflow: hidden;margin:30px auto;}

 

 

resultado do problema ...

pMKRMus.png

 

 

ninguem ae tio ! :dormindo:

Compartilhar este post


Link para o post
Compartilhar em outros sites

e se vc trocar:

.box{width:940px;height:auto;overflow: hidden;margin:0 auto; padding: 30px 0;}

fica mais fácil se vc postar um link para o site, pois pode ter vários elementos interferindo.

Compartilhar este post


Link para o post
Compartilhar em outros sites

 

e se vc trocar:

.box{width:940px;height:auto;overflow: hidden;margin:0 auto; padding: 30px 0;}

fica mais fácil se vc postar um link para o site, pois pode ter vários elementos interferindo.

nao adianto ...

 

 

blz ... hospedei aqui só para testar , após a solução irei tirar do ar .. então

http://keven.com.br/viver_adm/ loga ai

 

login:viver

senha : adm2013

 

dei margem top la ai tu ver como fica ...

Compartilhar este post


Link para o post
Compartilhar em outros sites

testei aqui e deu certo sim.

.box {
width: 940px;
height: auto;
overflow: hidden;
margin: 0 auto;
padding: 70px 0;
}

Compartilhar este post


Link para o post
Compartilhar em outros sites

 

 

não rola mano ...ele sóda espaçamento entre os elementos mas as divs não se deslocam uma da outra se liga eu dei padding top bem maior e ele só desce espaço do conteudo para com topconfig a box inteira em si não desce

 

jlzx.png

Compartilhar este post


Link para o post
Compartilhar em outros sites

não era isso que vc queria ?

 

não entendi cara. Qual é o efeito final pretendido ?

Compartilhar este post


Link para o post
Compartilhar em outros sites

só da espaçamento entre o topconfig eo box .... !!! e o topconfig deve pernamecer fixo la em cima ... e quando da o espaço no box para deslocar um do outro ele desloca o topconfig junto ... sendo que os 2 estão separadas

Compartilhar este post


Link para o post
Compartilhar em outros sites

então uê, com o padding faz isso que vc quer.

 

Qual o problema ?

Compartilhar este post


Link para o post
Compartilhar em outros sites

putz, agora entendi oq vc quer dizer.

coloca um top: 0;

#topconfig {
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(51,51,51,1), rgba(0,0,0,1));
    position: fixed;
    top: 0; left: 0;
}

Compartilhar este post


Link para o post
Compartilhar em outros sites

 

putz, agora entendi oq vc quer dizer.

coloca um top: 0;

#topconfig {
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(51,51,51,1), rgba(0,0,0,1));
    position: fixed;
    top: 0; left: 0;
}

 

ae meu jovem show :) por isso tu é lider de resolver problema kk ganhou mais uma , resolvido :)

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.