0

Basically I want to remove double borders at the sides, one border for every adjacent letter.

I want this:

enter image description here

But i get this:

enter image description here

Current code:

-------------------HTML------------------
    <div class="keyboard">
        <ul>
            <li>Q</li>
            <li>W</li>
            <li>E</li>
            <li>R</li>
            <li>T</li>
            <li>Y</li>
            <li>U</li>
            <li>I</li>
            <li>O</li>
            <li>P</li>
        </ul>
    </div>
--------------------CSS------------------
    .keyboard li{
        display: table-cell;
        border-width: 6px;
        border-style: solid;
        width: 95px;
        height: 95px;
        text-align: center;
        vertical-align: middle;
        border-radius: 10px;
    }

JSfiddle: http://jsfiddle.net/z89c6v0y/

I have tried using:

border-collapse: collapse;
margin-right: -10px;

.keyboard li:not(:last-child) {
    border-right: none;
}

I can overlap borders by using:

display: inline-block;
margin-right: -10px;

but then I can't center the text to the middle!

Also when using:

.keyboard li:not(:last-child) {
    border-right: none;
}

It makes a weird border, so it doesn't really help.enter image description here

Thank you for your help!

katinas
  • 432
  • 6
  • 11

0 Answers0