Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

Sign in to follow this  
Jakoozie9

O espaço não desaparece

Recommended Posts

Jakoozie9

Boas,

Estou com um problema num site.

ibxnk8.png

Aquele espaço não sai dali.

O que faço?

Share this post


Link to post
Share on other sites
scorch

Mostra o código. :)


scorch_pp.png

PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum.

Share this post


Link to post
Share on other sites
Jakoozie9
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css"> 
<!-- 
body  {
font: 100% Verdana, Arial, Helvetica, sans-serif;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #2695b1;
}
.twoColFixLtHdr #container {
width: 780px; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: center; /* this overrides the text-align: center on the body element. */
margin-top: 5%;
margin-right: 0%;
margin-bottom: 0%;
margin-left: 10%;
background-color: #2695b1;
} 
.twoColFixLtHdr #header {
padding: 0 10px 0 20px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
background-color: #2695b1;
} 
.twoColFixLtHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
background-color: #2695b1;
}
.twoColFixLtHdr #sidebar1 {
float: left; /* since this element is floated, a width must be given */
width: 230px;
background-color: #000;
color: #FFF;
padding: 0px;
}
.twoColFixLtHdr #mainContent {
padding: 0px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
background-color: #FFF;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 231px;
} 
.twoColFixLtHdr #footer {
padding: 0 10px 0 20px;
background-color: #2695b1;
} 
.twoColFixLtHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
background-color: #2695b1;
}
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
--> 
</style><!--[if IE 5]>
<style type="text/css"> 
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css"> 
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]--></head>

<body class="twoColFixLtHdr">

<div id="container">
  <div id="header">
    <h1><img src="http://tutorial9.s3.amazonaws.com/uploads/2008/01/duplogo1.jpg" alt="http://tutorial9.s3.amazonaws.com/uploads/2008/01/duplogo1.jpg" height="103" /></h1>
  <!-- end #header --></div>
  <div id="sidebar1">
    <h3>Paineis:
      <!-- end #sidebar1 -->
    </h3>
    <p> </p>
<p> </p>
    <p> </p>
    <p> </p>
<p> </p>
    <p> </p>
    <p><h3>Login:            
    </h3>
    <form target="_parent" form="" method="post" action="www.parapor.naoda">
      <div align="left">E-mail:</div>
              <input name="username2" size="20" type="text">
      <div align="left">Senha:</div>
              <input name="password2" type="password" size="20">

              <br>
              <p></p>
              <div align="center">
                <input class="black2" value="Login" type="submit">
              </div>
    </form></p>
  </div>
  <div id="mainContent">
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at,  odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce  varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id,  libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat  feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut,  sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh.  Donec nec libero.</p>
    <h2>H2 level heading </h2>
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venen</form>atis, tristique in, vulputate at, odio.</p>
    <!-- end #mainContent -->
    <br class="clearfloat" />
  </div>
  <div id="footer">
    <p>Design by: bghty</p>
  <!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>

Share this post


Link to post
Share on other sites
scorch

A mim esse código aparece-me diferente. O login, por exemplo, está do lado esquerdo, na barra lateral. De certeza que é esse o código da imagem?

EDIT:

Adiciona no .twoColFixLtHdr #mainContent

padding: 5px 0 0;


scorch_pp.png

PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum.

Share this post


Link to post
Share on other sites
Jakoozie9

Boas,

Estou a tentar fazer uma div com o mesmo tamanho do Main Content mas não consigo fazer.

Como faço?

Pergunta de noob sorry.

Share this post


Link to post
Share on other sites
Mac135

Porque não defines um tamanho para a div Main Content? e assim já poderias fazer uma outra div de igual tamanho.

Share this post


Link to post
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
Sign in to follow this  

×

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.