Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

xurissoooo

Table x Div

Recommended Posts

Desculpa eu sei que aqui é tirar duvida,

Mas eu queria aprender com um basico de como eu uso, pois não estou conseguindo fazer em Div

 

 

Alguem pode transformar meu site em DIV, onde tem Table

Pra tirar esse lixo todo e eu olhar e tentar aprender a partir de como ficou?

 

 

Url: http://xurisso.amserver1.com/xurisso1/conta.php

Segue codigo abaixo:

 

 

 

 

 

<?php
session_start();
if($_SESSION['validacao']!=1){
echo '<meta HTTP-EQUIV="Refresh" CONTENT="0; URL=deslogado.php">';
}else{
$login=$_SESSION['login'];
include  "conexao_banco.php";
$con = mysql_connect($host_banco,$usuario_banco,$senha_banco)
or die("nao conectou-se ao host");
mysql_select_db($nome_banco)or die("nao conectou-se ao banco");
$consulta="select nome from usuarios
           where login='$login'";
$result=mysql_query($consulta)
or die("TNT SECRETA $login");
while($linha=mysql_fetch_assoc($result)){
$nome = $linha['nome'];


}
?>
<!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>
<link href="css/top.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-repeat: repeat;
background-image: url(images/_wallp.jpg);
}
a:link {
color: #333;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #333;
}
a:hover {
text-decoration: none;
color: #00C;
}
a:active {
text-decoration: none;
color: #333;
}
</style>
<link href="css/conta.css" rel="stylesheet" type="text/css" />
</head>


<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="tabela_principal">
  <tr>
    <td width="437"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="menu_esquerda">
      <tr>
        <td><?php // Se esta Logado mostrar Foto
$con="select * from usuarios
 where login='$login'";
$result=mysql_query($con)
 or die("TNT NAO VAI $login");
while($linha=mysql_fetch_assoc($result)){
$foto=$linha['foto'];
$abre_foto=$dir_usuarios . $foto;
echo '
<div <p><img src="'.$abre_foto.'" width="160" height="160" class="avatar" id="photo1" border="1" /></div>
';


}




?></td>
      </tr>
    </table></td>
    <td width="317"> </td>
  </tr>
  <tr>
    <td><table width="300" border="0" align="left" cellpadding="1" cellspacing="2">
      <tr>
        <td bgcolor="#FFFFFF" class="top"><table width="100%" border="0" cellspacing="0" cellpadding="1">
          <tr>
            <td bgcolor="#FFFFFF"><div>
              <table width="95%" border="0" cellpadding="2" cellspacing="0" class="top">
                <tr>
                  <td><?php echo "Seja bem vindo querido(a) $nome </br>"; ?></td>
                </tr>
              </table>
            </div></td>
          </tr>
        </table></td>
      </tr>
    </table>
      <div></div></td>
    <td> </td>
  </tr>
  <tr>
    <td><table width="300" border="0" align="left" cellpadding="4" cellspacing="0">
        <tr>
        <td><table width="100%" border="0" cellpadding="1" cellspacing="0">
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#CCCCCC"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="boteco/boteco.php"><img src="images/_boteco.jpg" alt="Boteco" width="300" height="60" class="botoes_center" /></a></td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td><a href="manutencao.php"></a>
              <table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
                <tr>
                  <td bgcolor="#CCCCCC"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0">
                    <tr>
                      <td bgcolor="#FFFFFF"><a href="manutencao.php"><img src="images/_amigos.jpg" alt="Amigos" width="300" height="60" class="botoes_center" /></a></td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
            </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                  <td bgcolor="#CCCCCC"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0">
                    <tr>
                      <td bgcolor="#FFFFFF"><a href="manutencao.php"><img src="images/_eventos.jpg" alt="Eventos" width="300" height="60" class="botoes_center" /></a></td>
                    </tr>
                  </table></td>
                </tr>
            </table></td>
            </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#CCCCCC"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="usuarios/users_grupo.php"><img src="images/_pessoasdogrupo.jpg" alt="Pessoas do Grupo" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
            </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#CCCCCC"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="galeria/index.php"><img src="images/_albumpessoal.jpg" alt="Album pessoal" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table>              <a href="manutencao.php"></a></td>
            </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="usuarios/users_online.php"><img src="images/_pessoasonline.jpg" alt="Pessoas online" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table>              <a href="manutencao.php"></a></td>
            </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="produtos/lista_de_produtos.php"><img src="images/botao_anuncios500x100.jpg" alt="Anuncios" width="300" height="60" class="botoes_center" /></a><a href="usuarios/excluir.php"></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#CCCCCC"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="produtos/produtos.php"><img src="images/_seusanuncios.jpg" alt="Seus anuncios" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
            </tr>
          </table></td>
        </tr>
      <tr>
        <td><div></div>
          <div></div></td>
        </tr>
  </table></td>
    <td><table width="300" border="0" align="left" cellpadding="4" cellspacing="0">
      <tr>
        <td><table width="100%" border="0" cellpadding="1" cellspacing="0">
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="manutencao.php"><img src="images/_empregos.jpg" alt="Empregos" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><a href="manutencao.php"></a>
              <table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
                <tr>
                  <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                    <tr>
                      <td bgcolor="#FFFFFF"><a href="manutencao.php"><img src="images/_mensagens.jpg" alt="Mensagens" width="300" height="60" class="botoes_center" /></a></td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="manutencao.php"><img src="images/_grupos.jpg" alt="Grupos" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="batepapo/index.php"><img src="images/_batepapo.jpg" alt="Bate papo" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="manutencao.php"><img src="images/_editarperfil.jpg" alt="Editar perfil" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table>              <a href="manutencao.php"></a></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="alterarfoto.php"><img src="images/_alterarfoto.jpg" alt="Alterar foto" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table>              <a href="manutencao.php"></a></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#E9EAED"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="funcao.php"><img src="images/_sair.jpg" alt="Sair" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" align="left" cellpadding="1" cellspacing="2">
              <tr>
                <td bgcolor="#CCCCCC"><table width="100%" border="0" align="center" cellpadding="8" cellspacing="0" class="menu_esquerda">
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="produtos/lista_de_produtos.php"></a><a href="usuarios/excluir.php"><img src="images/_excluirusuario.jpg" alt="Excluir usuario" width="300" height="60" class="botoes_center" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          </table></td>
      </tr>
      <tr>
        <td><div></div>
          <div></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
</table>
</body>
</html>
<?php
}
?>

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Meu deux que código pesado.

 

Bom jovens eu vou dizer:

Não tem problema nenhum usar tabelas para dados tabulares....

 

Ou então pra deixar um label do lado do imput alinhadinho tudo certinho. O problema desse seu site é o exesso de elemento style inline dentro das tabelas e muitas tabelas...

 

Mas pera ai fazer td esse site ai com divs de graça? uh to fora e.e

 

Feliz natal :natallaugh:

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu só quero que alguem Limpe a página pra mim :/ Ta muito suja

 

Ouvi falar que Tabela é passado agora o Div substitui igualmente

 

Eu pensei que com Div dava para alinhar igual eu alinho com as tabelas, não dá?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Não o que acontece é o seguinte:

No passado 99, 2003, alguns web designers usavam tabelas para alinhar o site.... Mas tabelas ainda são usadas, não pra construção de layouts é claro, pra isso usamos divs ...

 

O fato é que eu acho muito difícil você achar alguém pra re-construir o site só que com divs, é difícil achar alguém que vai fazer isso de graça viu... Eu não vou fazer vai demorar muito

Compartilhar este post


Link para o post
Compartilhar em outros sites

Entendi, é que to tentando fazer com div mas to apanhando muito.

 

Voce pode fazer pra mim um div fixo com plano de fundo totalmente transparente, e dentro dele outro div dentro dele com CENTER e tamanho 50% com um pouco de transparencia que fique meio branco e aparecendo o plano de fundo.

 

E eu possa por meu site dentro deste segundo div

 

?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Poder eu posso maas não quero não, =X.

 

Estou atolado aqui pra fazer um site responsivo.R agora quero tirar umas ferias de criação web vou passar algumas semanas só jogando mesmo e malhando =X

Compartilhar este post


Link para o post
Compartilhar em outros sites

Melhorei meu codigo, agora ficou bom gente?

 

 

Limpei ele sozinho, sem ajuda de ngm so com a dica que voces falaram ai e minha ideia de misturar com o banco de dados.

 

Só não consegui ainda por o div central com transparencia.

 

http://xurisso.amserver1.com/

 

 

 

Código HTML

<?php
session_start();
//==============================
// VERIFICA SE USUARIO ESTA LOGADO
if($_SESSION['validacao']!=1){
include("login_code.php");
}else{
//==============================
// INCLUI ARQUIVO DE VARIAVEIS PARA CONEXAO
include  "conexao_banco.php";
//==============================
// CONECTA COM O BANCO DE DADOS
$con = mysql_connect($host_banco,$usuario_banco,$senha_banco)
or die("nao conectou-se ao host");
mysql_select_db($nome_banco)or die("nao conectou-se ao banco");
//==============================
// INICIA CONSULTA DE DADOS DO USUARIO
$consulta="select * from usuarios
           where login='$usuario'";
$result=mysql_query($consulta)
or die("TNT SECRETA $usuario");


while($linha=mysql_fetch_assoc($result)){
$nome=$linha['nome'];
//==============================
// VERIFICA E DEFINE BACKGROUND DA PAGINA
$bground_usuario=$linha['bground'];
$_SESSION['bground_session']=$linha['bground'];
}
if($bground_usuario==$bground_padrao){
$bground_dir="images/" . $bground_padrao;
}else{
$bground_dir='usuarios/' . $usuario . '/bground_' . $bground_usuario;
}
//==============================
?>
<!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>
<link href="css/top.css" rel="stylesheet" type="text/css" />






<style type="text/css">
body {
background-repeat: repeat;
background-image: url(<?php echo "$bground_dir"; ?>);
}
a:link {
color: #333;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #333;
}
a:hover {
text-decoration: none;
color: #00C;
}
a:active {
text-decoration: none;
color: #333;
}


</style>
<link href="css/conta.css" rel="stylesheet" type="text/css" />
<link href="css/contamenu.css" rel="stylesheet" type="text/css" />
<link href="css/formata.css" rel="stylesheet" type="text/css" />


</head>


<body>
<div class="fcentro">


<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="tabela_principal">
  <tr>
    <td width="437"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="menu_esquerda">
      <tr>
        <td>
<?php // Se esta Logado mostrar Foto
$con="select * from usuarios
 where login='$usuario'";
$result=mysql_query($con)
 or die("TNT NAO VAI $usuario");
while($linha=mysql_fetch_assoc($result)){
$foto=$linha['foto'];
$abre_foto= 'usuarios/' . $foto_usuarios . $foto;
echo '
<div <p><img src="'.$abre_foto.'" width="160" height="160" class="avatar" id="photo1" border="1" /></div>
';


}




?></td>
      </tr>
    </table></td>
    <td width="317"> </td>
  </tr>
  <tr>
    <td>
<?php
//=========================
//PREFIXO DO MENU DIV
if ($menu_session=="2"){ echo ' <div class="card signin-card clearfix"> '; }
//=========================


$seleciona = mysql_query("select * from menu where pagina='conta.php'");
while ($linha = mysql_fetch_assoc($seleciona)) {


$_linkmenu=$linha['linkmenu'];
$_idmenu=$linha['idmenu'];
$_nomemenu=$linha['nome'];
$_arquivomenu=$linha['arquivo'];


//=========================
// MENU TABLE
if ($menu_session=="1"){
echo '<table width="300px" border="0" align="left" cellpadding="1" cellspacing="2">
      <tr>
        <td bgcolor="#CCCCCC"><table width="300px" border="0" align="center" cellpadding="8" cellspacing="0">
          <tr>
            <td bgcolor="#FFFFFF"><a href=' . $_linkmenu . '><img src=' . $_arquivomenu . ' alt=' . $_idmenu . ' width="100%" height="60" class="botoes_center" /></a></td>
          </tr>
        </table></td>
      </tr>
    </table>';


}
//=========================
// MENU DIV
if ($menu_session=="2"){
echo '<div><a href=' . $_linkmenu . '><input name="' . $_idmenu . '" type="submit" class="rc-button rc-button-submit" id="' . $_idmenu . '" value="' . $_nomemenu . '" /></a></div>';
}
//=========================
// TERMINA REPETICAO
};
//=========================
// SUFIXO DO MENU DIV
if ($menu_session=="2"){ echo '</div>'; }
//=========================
?>
    </td>
    <td></td>
  </tr>
</table>


</div>
</body>
</html>
<?php
}
?>

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.