Jump to content

[Resolvido] div ao top


alexmestre
 Share

Recommended Posts

bom dia, gostaria de saber o que se passa com este codigo porque nao consigo com que ele faca a div header ficar colado ao top, deixa sempre um paragrafo em branco?

<body>
	 <div id="header">
<h1>Barra superior</h1>
  </div>
  <div id="leftcolumn">
<h1>Conteúdo</h1>
  </div>
  <div id="content">
		 <h1>conteudo</h1>
		</div>
  <div id="footer">
<address>fim</address>
  </div>

 </body>

o css é este

*{
margin: 0px;
padding: 0px;
}
#body{
text-align:center;
}
#header{
background:#C09;
height:100px;
line-height:100px;
position:static;
width:100%;
top:0;
}
#leftcolumn {
background: #2675a8;
float: left;
width: 25%;
height: 700px;
}
#content {
background:#3F3;
float: left;
width: 75%;
height: 700px;
}
#footer {
background: #df781c;
clear: both;
width: 100%;
}

Alguem me pode ajudar?

Obrigado desde já

Edited by alexmestre
Link to comment
Share on other sites

boa tarde, ja consegui maneira de resolver nos meus browsers funciona bem

o css metade ainda esta em comentario pois ainda estou preparando outras coisas

*{
margin: 0px;
padding: 0px;
}
body {
text-align:center;
background-color:#FFF;
}
#barra_cima{
background-color: #48c3c8;
width: 100%;
height: 35px;
top: 6px;
margin-top: -20px;
position: absolute;
}
#barra_logo{
background-color: #4b4239;
width: 100%;
height: 150px;
top: 30px;
margin-top: -10px;
position: absolute;
}
#logotipo{
text-align:left;
margin-left:15%;
}
/**
#header{
background:#C09;
height:100px;
line-height:100px;
position:static;
width:100%;
top:0;
}
#leftcolumn {
background: #2675a8;
float: left;
width: 25%;
height: 900px;
}
#content {
background:#3F3;
float: left;
width: 75%;
height: 900px;
}
#footer {
background: #df781c;
clear: both;
width: 100%;
}*/

e o html assim

<body bgcolor="#ffffff">
	<div id="barra_cima">
	</div>
	<div id="barra_logo">
	 <div id="logotipo">
	  <img src="imagens/Sem Título-1,29.jpg">
		</div>
	</div>
</body>
Edited by alexmestre
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.