Title: Tabs&#8230;.:(
Last modified: August 22, 2016

---

# Tabs….:(

 *  Resolved [Sauron](https://wordpress.org/support/users/sauron/)
 * (@sauron)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/)
 * Hi,
 * I am trying to make a list of opening times. I need to put the days and the opening
   hours on the same line. How the **)# can i make these aligned? with the line 
   under (or above) Example:
 * Mondays 20:00 – 22:00
    Tuesdays 20:00 – 22:00 Wednesdays 18:00 – 21:00
 * As you can see, the ours are not completely aligned. How to solve this easy? 
   I tried making a table, but not much success since it seems like my theme overruns
   it with color and size settings….arghhh

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898385)
 * > As you can see, the ours are not completely aligned.
 * see where?
 * can you provide a live link to your site, to a post or page with the problem?
 * what theme are you using?
 * [http://codex.wordpress.org/Forum_Welcome#Include_as_much_information_as_possible](http://codex.wordpress.org/Forum_Welcome#Include_as_much_information_as_possible)
 *  Thread Starter [Sauron](https://wordpress.org/support/users/sauron/)
 * (@sauron)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898387)
 * I tried to make the example in my post, but i see that even this forum messes
   up my spaces….:)
 * Anyway, here is an example if you go to the section opening hours:
 * [http://www.whalesafari.no/en/restaurant](http://www.whalesafari.no/en/restaurant)
 * This is not the worst example, but i guess it still makes the point.
 * I am using the Omni theme.
 *  [martcol](https://wordpress.org/support/users/hotmale/)
 * (@hotmale)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898398)
 * You can try this.
 * Go to that post/page and use the text editor rather than the visual editor. Add
   this just before the list of hours:
 * `<div style="text-align: right; width: 45%;">`
 * Immediately after the list of hours, add this:
 * `</div>`
 * You could also add the div with a class like this:
 * `<div class="open-hours">`
 * Then add the CSS using a child theme or a CSS plugin.
 *     ```
       .open-hours {
       width: 45%;
       text-align: right;
       }
       ```
   
 * If you want to create space between the day and the hours, you can wrap the hours
   in a span:
 *     ```
       <div class="open-hours">
       Monday <span>20:00 to 22:00</span>
       Monday <span>20:00 to 22:00</span>
       </div>
       ```
   
 * Then you can style the span:
 *     ```
       .open-hours span{
       padding-left: 12px;
       }
       ```
   
 * It looks more complicated than it is.
 * If you want it to work responsively then you are going to need to think what 
   you break points are and change or remove the width on the div accordingly.
 *  Thread Starter [Sauron](https://wordpress.org/support/users/sauron/)
 * (@sauron)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898437)
 * Hi,
 * Tried the last method but got the following result:
 * [http://www.whalesafari.no/restaurant](http://www.whalesafari.no/restaurant)
 * As you can see the whole list is shifted to the right and aligned. If i change
   the text-align attribute to left instead of right, I get the same result as I
   had originally. Ideas? 🙂
 *  [martcol](https://wordpress.org/support/users/hotmale/)
 * (@hotmale)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898441)
 * HTML
 *     ```
       <div class="open-hours">
       <p>Mandager<span>12:00 - 20:00</span></p>
       <p>Tirsdager<span>12:00 - 22:00</span></p>
       <p>Onsdager<span>12:00 - 22:00</span></p>
       <p>Torsdager<span>12:00 - 22:00</span></p>
       <p>Fredager<span>12:00 - 22:00</span></p>
       <p>Lørdager<span>11:00 - 22:00</span></p>
       <p>Søndager<span>12:00 - 20:00</span></p></div>
       ```
   
 * No br or non-breeaking spaces
 * CSS
 *     ```
       .open-hours span {
         display: inline-block;
         float: right;
         text-align: right;
         width: 106px;
       }
       ```
   
 *     ```
       .open-hours p {
         line-height: 1.4;
         margin: 0;
         padding: 0;
       }
       ```
   
 *     ```
       .open-hours {
         display: table;
         margin-bottom: 18px;
       }
       ```
   
 *  [martcol](https://wordpress.org/support/users/hotmale/)
 * (@hotmale)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898442)
 * You could also indent it a little by adding:
 * `margin-left: 24px;`
 * To the .open-hours rule.
 *  Thread Starter [Sauron](https://wordpress.org/support/users/sauron/)
 * (@sauron)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898445)
 * Hmmm…
 * Got this now:
 * [http://www.whalesafari.no/restaurant](http://www.whalesafari.no/restaurant)
 * Can it be that something else is overriding this code? Copied and pasted your
   code, so it should be correct. Amazing that it is so hard to just get some basic
   tab functionality…:) Did the inventors forget it? 😉
 *  [martcol](https://wordpress.org/support/users/hotmale/)
 * (@hotmale)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898446)
 * The HTML does not appear to have the span element inside the p element
 *  [martcol](https://wordpress.org/support/users/hotmale/)
 * (@hotmale)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898447)
 * .open-hours span {
    display: inline-block; float: right; text-align: right; width:
   106px; margin-left: 16px; }
 * And I forgot margin-left in that rule. You can change the value as you see fit.
 *  Thread Starter [Sauron](https://wordpress.org/support/users/sauron/)
 * (@sauron)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898452)
 * Worked well!! 🙂
 * I was planning to use a table for this but i got into a lot of problems since
   i did not manage to:
 * 1) Make a table that didn’t use the whole with of the section.
    2) Make the cell
   borders invisible.
 * Do you think that is due to a kind of “global” setting somewhere?
 * If you check this page:
 * [http://www.whalesafari.no/en/departures](http://www.whalesafari.no/en/departures)
 * you can see that i managed to make some tables with a shortcake plugin. How to
   change colors and the with of the table is a big question since it seems that
   all tables I make end up in that size anyway…
 * Maybe I should read some basic HTML and CSS….;)
 * Anyway, thanks a lot for solving my “tab” problem!
 *  Thread Starter [Sauron](https://wordpress.org/support/users/sauron/)
 * (@sauron)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898453)
 * by the way…dont know where “shortcake” came from…was supposed to be shortcode…:
   D
 *  [martcol](https://wordpress.org/support/users/hotmale/)
 * (@hotmale)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898454)
 * I’m glad you got it sorted.
 * As for “global” settings, it is likely that your them has some CSS for most elements.
   However, it is likely that with CSS, you can add your own styles.
 * I think the best way to edit a theme is to use a child theme.
 * I looked at your tables and they seemed good to me. Well done.
 * It won’t hurt to read about HTML/CSS.
 * Maybe you could mark this thread “resolved.”
 *  Thread Starter [Sauron](https://wordpress.org/support/users/sauron/)
 * (@sauron)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898455)
 * Will do…and again, thanks!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Tabs….:(’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 3 participants
 * Last reply from: [Sauron](https://wordpress.org/support/users/sauron/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/tabs-18/#post-5898455)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
