A travel blog about adventure and culture

Traveler´s Buddy

  • HOME
  • TRAVEL 101
  • TRAVEL JOURNAL
  • DESTINATIONS
    • Africa
    • America
    • Asia
    • Europe
  • TRAVELBUZZ
  • MORE
    • Write for Traveler’s Buddy
    • Work with me
      • Media content
      • Video Content
      • Photography and Video content
    • Contact me
    • About me
    • MediaKit
  • Home
  • Style – Tables
February 4, 2023

Style – Tables

Style – Tables

Default styles

For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>.

#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
<table>
  …
</table>

Optional classes

Add any of the following classes to the .table base class.

.table-striped

Adds zebra-striping to any table row within the <tbody> via the :nth-child CSS selector (not available in IE7-IE8).

#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
<table>
  …
</table>

.table-bordered

Add borders and rounded corners to the table.

#First NameLast NameUsername
1MarkOtto@mdo
MarkOtto@TwBootstrap
2JacobThornton@fat
3Larry the Bird@twitter
<table>
  …
</table>

.table-hover

Enable a hover state on table rows within a <tbody>.

#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
<table>
  …
</table>

.table-condensed

Makes tables more compact by cutting cell padding in half.

#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
<table>
  …
</table>

Optional row classes

Use contextual classes to color table rows.

ClassDescription
.successIndicates a successful or positive action.
.errorIndicates a dangerous or potentially negative action.
.warningIndicates a warning that might need attention.
.infoUsed as an alternative to the default styles.
#ProductPayment TakenStatus
1TB – Monthly01/04/2012Approved
2TB – Monthly02/04/2012Declined
3TB – Monthly03/04/2012Pending
4TB – Monthly04/04/2012Call in to confirm
...
  <tr class="success">
    <td>1</td>
    <td>TB - Monthly</td>
    <td>01/04/2012</td>
    <td>Approved</td>
  </tr>
...

Supported table markup

List of supported table HTML elements and how they should be used.

TagDescription
<table>Wrapping element for displaying data in a tabular format
<thead>Container element for table header rows (<tr>) to label table columns
<tbody>Container element for table rows (<tr>) in the body of the table
<tr>Container element for a set of table cells (<td> or <th>) that appears on a single row
<td>Default table cell
<th>Special table cell for column (or row, depending on scope and placement) labelsMust be used within a <thead>
<caption>Description or summary of what the table holds, especially useful for screen readers
<table>
  <caption>...</caption>
  <thead>
    <tr>
      <th>...</th>
      <th>...</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>...</td>
      <td>...</td>
    </tr>
  </tbody>
</table>

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

See my work for Lonely Planet

Juan Martinez - Lonely Planet Berlin

See more of my work

Juan Martinez BBC Travel - Deutsche Welle

Follow me on Instagram

Instagram Juan Martinez Travelers Buddy

Follow me on facebook

facebook banner travelersbuddy

See my videos on YouTube

youtube channel Travelersbuddy

YOU MIGHT ALSO LIKE

  • What happens when you lose your GoPro in the ocean and find it one month later?What happens when you lose your GoPro in the ocean and find it one month later?
  • What are the top safari experiences in AfricaWhat are the top safari experiences in Africa
  • Finland: How Kuopio is transforming itself into a food capitalFinland: How Kuopio is transforming itself into a food capital
  • Snorkeling and sea kayaking in Palau’s rock islandsSnorkeling and sea kayaking in Palau’s rock islands
  • Breaking cities: How much costs a day in ParisBreaking cities: How much costs a day in Paris
  • Road trip in the Alps: Driving through the Grossglockner High Alpine RoadRoad trip in the Alps: Driving through the Grossglockner High Alpine Road
  • Traveling in Seville, Europe’s most underrated hidden gemTraveling in Seville, Europe’s most underrated hidden gem
  • Which are longest and most iconic train journeys in the worldWhich are longest and most iconic train journeys in the world
  • Stavanger street art is taking over the cityStavanger street art is taking over the city
  • Do you know where these American landscapes are located?Do you know where these American landscapes are located?

RECENT POSTS

  • The art of slow travelling in the Bahamas

    The art of slow travelling in the Bahamas

    In the Bahamas, there is a way of transport for...
  • The logistics of planning the longest train journey in the world

    The logistics of planning the longest train journey in the world

    With the inauguration of the train route betwee...
  • Royal Drummers of Burundi in Gishora

    Burundi, the country where the drums are sacred

    In Burundi, playing the drums is a symbol of re...
  • Beach Burundi - Best things to do in Bujumbura

    Best things to do in Bujumbura

    Definitely off-the-beaten-path, Bujumbura is a ...
  • Landscape between DRC and Burundi - crossing Burundi overland

    How to cross to Burundi overland

    Whether you come from Uganda, Rwanda, DRC, or T...
  • These are the world's rarest and most unusual passports

    These are the world’s rarest and most unusual passports

    From alien to Interpol passports, these are the...
  • Exploring East Africa – Best natural places to travel in Burundi

    Exploring East Africa – Best natural places to travel in Burundi

    Known as one of the least visited countries in ...
  • Meeting the Pygmies - Africa's forgotten tribe

    Meeting the Pygmies – Africa’s forgotten tribe

    Known as “the children of the jungle,&#82...

WRITE YOUR STORY

We accept guest posts from bloggers, journalists or travel enthusiast about anything what motivated you to travel and experience new things

CONTACT ME HERE

WORK WITH ME

Last year we worked with over 10 different tourism boards from all over the globe. Learn more how we can work together and present how awesome your destination is

CONTACT ME HERE

COME AND SAY HI

Don't be shy and just drop us an email. It´s free

CONTACT ME HERE
Travelers Buddy Mountains Footer
  • Home
  • Travel journal
  • About me
  • Contact me
  • Write for Traveler’s Buddy
  • Imprint
  • More about Traveler´s Buddy
  • Travel journal
  • Home
  • About me
  • Work with me
  • Write for Traveler’s Buddy
  • Contact me
  • GET SOCIAL

www.thetravelersbuddy.com© 2021. All rights reserved

TOP