Note that there are some explanatory texts on larger screens.

plurals
  1. PODifficulty aligning divs
    primarykey
    data
    text
    <p>There are a number of similar topics, but none of the ones I looked at have helped me solve the problem I've encountered. Basically, I have a set of tabs that I want to be aligned in the center of my page. Unfortunately, they appear slightly left of center, which looks absolutely terrible. Maybe I missed something obvious, but after poking around with the code for almost an hour, I'm starting to think the issue is a little more complex.</p> <p>I prepared a jsFiddle: <a href="http://jsfiddle.net/5NTY5/" rel="nofollow">http://jsfiddle.net/5NTY5/</a></p> <pre><code> &lt;div style="text-align:center;"&gt;The tabs below should line up with this text.&lt;/div&gt; &lt;br/&gt; &lt;div style="text-align:center;"&gt; &lt;ul class="_t_ul"&gt; &lt;li class="_t_li"&gt;Tab 1&lt;/li&gt; &lt;li class="_t_li"&gt;Tab 2&lt;/li&gt; &lt;li class="_t_li"&gt;tab 3&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;br/&gt; &lt;div style="text-align:center;"&gt;As you can see, it isn't even close.&lt;/div&gt; ._t_ul { line-height:33px; list-style:none; } ._t_li { display: inline; cursor:pointer; text-align:center; color: #698da5; font-family:'Anton', sans-serif; font-size: 14px; font-weight:bold; text-align:center; padding:16px; background-color: rgba(82%, 82%, 82%, 0.5); border: 1px solid #acadaf; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; } ._t_li:hover { background-color: rgba(82%, 82%, 82%, 0.8); } </code></pre> <p>Also, I was able to get it to align properly using inline elements, but I'd like to know if it's possible to do with block (such as li and div).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload