div does not respect the size set in css

Asked

Viewed 734 times

1

I’m trying to create a messaging system, but the formatting of the div is not respecting the size. I’d like you to help me, so I know where I’m going wrong:

#limit {
  max-width: 500px;
}


#table-overflow {
  max-height:400px;
  overflow-y:auto;
}



#targetDiv{
  /* ... */

  position: absolute;
  top:      1000;
  bottom:   0;
  left:     0;
  right:    0;
  overflow: hidden;

  /* .
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- FACEBOOK META-TAGS -->

<meta property="og:title" content=""/>
<meta property="og:image" content="http://i1.ytimg.com/vi//0.jpg"/>
<meta property="og:site_name" content="http://http://paulosergioduff.atspace.cc/cpu.php"/>
<meta property="og:description" content="">

<!-- faceapp  -->

<!-- O jQuery NÃO é necessário para utilização do SDK Javascript do Facebook. Incluí por utilizar em outra parte deste exemplo -->

<div class="navbar navbar-inverse navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
      <a class="brand" href="index.php">Live JSON</a><img src="img/jasonmask31x31.png">
      <div class="nav-collapse collapse">
        <ul class="nav">

        </ul></div><!--/.nav-collapse -->
    </div>
  </div>
</div><br>
<hr>

</hr>

<div class="container-narrow" >

  <div class="masthead">
    <ul class="nav nav-pills pull-left">
      <li class="active"><a href="index.php">Início</a></li>
      <li><a href="caixaentrada.php">Mensagens</a></li>
      <li><a href="config.php">Meu perfil</a></li>
      <li><a href="dev.php">Desenvolvimento</a></li>     
    </ul><br>
    <h3 class="muted">O que tem a oferecer ao mundo?</h3>
  </div>
  <center >
    <form action="cpu.php" method="GET">
      <!--Usuário:
<select name="user" >
<option value="ceaed6e06da7162089094ab24b33905fd5a78f88">ceaed6e06da7162089094ab24b33905fd5a78f88</option> 
</select><br> -->
      Mensagem:
      <textarea name="menssage"></textarea>	<input type="submit" value="Enviar sinal" class="btn btn-large btn-success">
      <hr>

      <div id='limit' align='left'>
        <hr>
        <img src='img/ceaed6e06da7162089094ab24b33905fd5a78f88.jpg' width='31' height='31' />
        <div aling='left'id='limit' >
          novo banco<hr></div><div id='limit' align='left'><hr><img src='img/ceaed6e06da7162089094ab24b33905fd5a78f88.jpg' width='31' height='31' />
        <div aling='left'id='limit' >
          novo teste<hr></div><div id='limit' align='left'><hr><img src='img/ceaed6e06da7162089094ab24b33905fd5a78f88.jpg' width='31' height='31' />
        <div aling='left'id='limit' >
          dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd<hr></div><div id='limit' align='left'><hr><img src='img/ceaed6e06da7162089094ab24b33905fd5a78f88.jpg' width='31' height='31' />
        <div aling='left'id='limit' >
          dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd<hr></div><div id='limit' align='left'><hr><img src='img/ceaed6e06da7162089094ab24b33905fd5a78f88.jpg' width='31' height='31' />
        <div aling='left'id='limit' >
          dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd<hr></div><div id='limit' align='left'><hr><img src='img/jasonmask31x31.jpg' width='31' height='31' />
        <div aling='left'id='limit' >
          <hr></div><a href='downloadfile.php'>Baixar conversa</a>

  • Try to add word-break:break-all; in the div css. I’m no web/css expert, but I found this tip here, and it seemed to work. Maybe it’s not the ideal solution in this case.

  • This link analyzes the HTML syntax http://www.billauer.co.il/html_highlighting_nesting.html

1 answer

1


Your marking is not correct

height='31

Whenever opening quotes you need to close, I suggest using a sublime IDE or any other to make it easier to read the code.

height='31px'
  • I fixed it, but the problem persisted. Basically it is happening in that div that is the text with "Ddddd......" until filling the screen. I can’t find the fault!

  • I managed to solve it! I had to close a div in the navbar. Thanks in advance!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.