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
September 30, 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

  • Exploring the Makgadikgadi Pans in Botswana – A different type of safariExploring the Makgadikgadi Pans in Botswana – A different type of safari
  • How good are you with airport codes?How good are you with airport codes?
  • Rappelling Colombia’s secret waterfallsRappelling Colombia’s secret waterfalls
  • How to plan a gorilla trekking in Uganda’s Bwindi Impenetrable ForestHow to plan a gorilla trekking in Uganda’s Bwindi Impenetrable Forest
  • Interrail guide – the most flexible way to travel through Europe by trainInterrail guide – the most flexible way to travel through Europe by train
  • Free hotels and tours during a stop-over? – What is a Stopover Paid by CarrierFree hotels and tours during a stop-over? – What is a Stopover Paid by Carrier
  • Traveling in Seville, Europe’s most underrated hidden gemTraveling in Seville, Europe’s most underrated hidden gem
  • Which are the most bizarre travel experiences in Burkina FasoWhich are the most bizarre travel experiences in Burkina Faso
  • How to plan a trip to MauritiusHow to plan a trip to Mauritius
  • Dolomites‘ most adventurous hike – The Cortina Dolomiti Ultra TrekkingDolomites‘ most adventurous hike – The Cortina Dolomiti Ultra Trekking

RECENT POSTS

  • Djenne mosque from restaurant viewpoint

    Everything you need to know before to travel to Mali

    Untouched, volatile, yet incredibly rewarding, ...
  • How to plan the perfect safari trip in Africa

    How to choose the perfect African safari trip

    Destination, budget, type of safari—here, I wil...
  • Which are the most bizarre travel experiences in Burkina Faso

    Which are the most bizarre travel experiences in Burkina Faso

    From sitting next to wild crocodiles, to ceremo...
  • Best things to do in Ouagadougou, Burkina Faso

    Best things to do in Ouagadougou, Burkina Faso

    Often overlooked due to its remote location, Ou...
  • How to plan a safari trip on a budget

    How to plan a safari trip on a budget

    Can safaris be done on a budget? After experien...
  • How to plan a trip to Mauritius

    How to plan a trip to Mauritius

    There are only a few countries most travelers c...
  • Hidden Currency Markets: 6 Countries with Favorable Parallel (Black) Market Exchange Rates

    While in some countries exchanging money is jus...
  • Best things to do in Niamey

    Niger Unveiled: Best things to do in Niamey

    Being one of the less traveled capitals in the ...

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