Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Galera,
Aplicando CSS no meu script de um formulário, com HTML 5, o tamanho das células ficaram totalmente superdimensionadas, ficando com um lay-out pouco estético.
Mas vamos ao código:
<?php
require_once "restrito.php";
?>
<?php
require_once("res_estoque.php");
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" >
<title>MOVIMENTO DE ITENS NO ESTOQUE</title>
<script type="text/javascript" src="jquery-1.6.min.js"></script>
<script type="text/javascript" src="jquery.maskedinput-1.3.min.js"/></script>
<script type="text/javascript">
jQuery(function () {
$(".esto").mask("9.a.999.999");
$(".em_data_nf").mask("9999-99-99");
$(".em_validade").mask("9999-99-99");
$(".em_nf_vence").mask("9999-99-99");
});
</script>
<style type="text/css">
USANDO O CÓDIGO CSS ABAIXO, AS CELULAS FICAM COM ALTURA DE 60 PIXELS
h1 {font-family: arial, verdana, sans-serif;
font-size: 85%;
color: blue;
}
USANDO O CÓDIGO CSS ABAIXO, AS CELULAS FICAM COM ALTURA DE 20 PIXELS
font.h1 {font-family: arial, verdana, sans-serif;
font-size: 100%;
color: blue;
}
table
{
font-family: arial, verdana, sans-serif;
width:940px;
border-collapse:collapse;
}
table td, th
{
border:1px solid #2424FF;
line-height: 30px;
}
table th
{
text-align:left;
background-color:#FFB380;
line-height: 30px; AQUI EU CONTROLO A ALTURA DAS CELULAS
}
</style>
</head>
<body style="background-color:#D9E6FD">
COM O HTML ABAIXO A ALTURA DAS CELULAS FICAM COM 60 PIXELS
<table>
<tr>
<th width="37%"> <h1>Código Empresa:</h1></th>
<th width="35%"> <h1>CNPJ</h1></th>
<th width="28%"> <h1>Inscrição Estadual:</h1></th>
</tr>
<tr>
<th>
<h2><?php echo $empre;?></h2>
<input type="hidden" name="fc_ID" value="<?php echo $empre;?>">
</th>
<th>
<h2><?php echo $cnpj;?></h2>
<input type="hidden" name="fc_cnpj" value="<?php echo $cnpj;?>">
</th>
<th>
<h2><?php echo $ie;?></h2>
<input type="hidden"name="fc_ie" value="<?php echo $ie;?>">
</th>
COM O HTML ABAIXO A ALTURA DAS CELULAS FICAM COM 20 PIXELS
<tr>
<th width="37%"> <font class="h1">Código Empresa:</th>
<th width="35%"> <font class="h1">CNPJ</th>
<th width="28%"> <font class="h1">Inscrição Estadual:</th>
</tr>
</tr>
</table>
</body>
</html>
Resumindo:
- Usando a tag <h1> a altura da célula fica grande;
- Usando a tag <font class="h1"> a altura da célula fica menor e mais fácil de dimensionar.
Alguém tem alguma observação a fazer, o porque das diferenças?
Cordialmente,
Walter Chilomer
Carregando comentários...