Claire 0 Denunciar post Postado Fevereiro 18, 2010 Gente é o seguinte, eu tenho uma tabela com tamanho FIXO (e este tamanho não pode mudar), quando eu coloco um texto dentro desta tabela fica tudo perfeito... Porém, o espaço entre as linhas está muito grande, então eu resolvi diminuir este espaço usando o comando line-height, mas acontece que logo após usar este comando a primeira frase do texto fica semi-apagada em cima, percebi que o texto fica um pouco pra fora da div que eu usei para escrever o texto. O fato é que com ou sem div o texto fica semi-apagado quando eu uso o comando line-height. Alguém sabe o que eu posso fazer? Gostaria de aumentar a div independente do texto, isso é possível? Porque eu acho que se a div ficar maior o texto vai aparecer... E eu PRECISO usar o comando line-height. Segue o código: ------------------------------------------------------------------------------------------- <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; } .texto_padrao2 { font-size: 12px; color: #42788a; line-height: 3px; } --> </style> </head> <body> <table width="985" height="229" border="0" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"> <p class="texto_padrao2">- Come pouco, mas não emagrece?</p> <p class="texto_padrao2">- Reposição hormonal e soja.</p> <p class="texto_padrao2">- Cigarro. Como parar de fumar.</p> <p class="texto_padrao2">- Como ter uma boa digestão.</p> <p class="texto_padrao2">- Benefícios das fibras na alimentação.</p> <p class="texto_padrao2">- Benefícios das fibras na alimentação.<br /></p> </div> </td> </tr> </table> </body> </html>------------------------------------------------------------------------------------------- Obrigada!! Compartilhar este post Link para o post Compartilhar em outros sites
GabrielFerrari 41 Denunciar post Postado Fevereiro 19, 2010 Basta adicionar uma margem ao elemento. No caso eu alterei a classe apenas para a div em vez de cada parágrafo (<p>) pela utilização que você postou aqui não tem problema. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; } .texto_padrao2 { font-size: 12px; color: #42788a; line-height: 3px; margin: 3px; } --> </style> </head> <body> <table width="985" height="229" border="0" cellpadding="0" cellspacing="0"> <tr> <td><div align="center" class="texto_padrao2"> <p>- Come pouco, mas não emagrece?</p> <p>- Reposição hormonal e soja.</p> <p>- Cigarro. Como parar de fumar.</p> <p>- Como ter uma boa digestão.</p> <p>- Benefícios das fibras na alimentação.</p> <p>- Benefícios das fibras na alimentação. </p> </div> </td> </tr> </table> </body> </html> mas caso queira manter como estava.. só precisa por um ID na div e colocar a marge <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body,td,th { font-family: Arial, Helvetica, sans-serif; } .texto_padrao2 { font-size: 12px; color: #42788a; line-height: 3px; } #div_do_text{ margin: 3px; } --> </style> </head> <body> <table width="985" height="229" border="0" cellpadding="0" cellspacing="0"> <tr> <td><div align="center" id="div_do_text"> <p class="texto_padrao2">- Come pouco, mas não emagrece?</p> <p class="texto_padrao2">- Reposição hormonal e soja.</p> <p class="texto_padrao2">- Cigarro. Como parar de fumar.</p> <p class="texto_padrao2">- Como ter uma boa digestão.</p> <p class="texto_padrao2">- Benefícios das fibras na alimentação.</p> <p class="texto_padrao2">- Benefícios das fibras na alimentação. </p> </div> </td> </tr> </table> </body> </html> Compartilhar este post Link para o post Compartilhar em outros sites