Tabelas no Bootstrap não funcionam

Front-end

28/07/2014

Estou tentando criar uma tabela simples com Bootstrap, seguindo todas as instruções da página "Getting Started". Mas a tabela aparece sem formatação nenhuma, toda bagunçada. Coloquei thead e tbody, mas não aparece formatação nenhuma. Alguém já passou por algo semelhante?
Franzé Peixoto

Franzé Peixoto

Curtidas 0

Melhor post

Eduardo Martins

Eduardo Martins

28/07/2014

Boa Tarde Franzé Peixoto.

A tabela esta certa. Verifica no seu html se existe.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet"><!-- isso aqui -->

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script><!-- isso aqui -->
  </body>
</html>
GOSTEI 1

Mais Respostas

Joel Rodrigues

Joel Rodrigues

28/07/2014

Olá, Franzé.
Poderia copiar o seu código, para darmos uma analisada?
GOSTEI 0
Franzé Peixoto

Franzé Peixoto

28/07/2014

ta aqui


<table class="table table-bordered table-hover">
    <thead>
        <tr>
            <th>Marca</th>
            <th>Descrição</th>
            <th>Ano</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Ford</td>
            <td>Ka</td>
            <td>2009</td>
        </tr>
        <tr>
            <td>Chevrolet</td>
            <td>Celta</td>
            <td>2011</td>
        </tr>
        <tr>
            <td>Wolksvagen</td>
            <td>Gol</td>
            <td>2007</td>
        </tr>
    </tbody>
</table>

GOSTEI 0
Franzé Peixoto

Franzé Peixoto

28/07/2014

Não tem tudo isso não, eu copiei o código da página Getting Started:


<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
 
<!-- Optional theme -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
 
<!-- Latest compiled and minified JavaScript -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

GOSTEI 0
Joel Rodrigues

Joel Rodrigues

28/07/2014

Opa, Franzé.
Nos links que você está usando (atributo href e src) está faltando http: antes do //maxcdn....
Faça assim:
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
  
<!-- Optional theme -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
  
<!-- Latest compiled and minified JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
GOSTEI 0
Franzé Peixoto

Franzé Peixoto

28/07/2014

era só isso mesmo deu certo.
GOSTEI 0
Joel Rodrigues

Joel Rodrigues

28/07/2014

Show de bola. Legal que deu certo!
Abraço e bons códigos.
GOSTEI 0
POSTAR