I am currently working on creating a grid view using . I have been able to achieve the desired output, which displays borders only inside the outer box. However, I had to duplicate style rules to accomplish this. I'm looking for suggestions on how to achieve the same result in a more efficient way. Here is an image of the result: Grid selector
.ui-draggable, .ui-droppable {
background-position: top;
}
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active
{
border-bottom: 1px solid red;
border-left: 1px solid red;
background: #fff;
font-weight: normal;
}
.ui-state-default-left, html .ui-button.ui-state-disabled:active
{
border-left: none;
border-bottom: 1px solid red;
background: #fff;
font-weight: normal;
}
.ui-state-default-bottom, html .ui-button.ui-state-disabled:active
{
border-left: 1px solid red;
border-bottom: none;
background: #fff;
font-weight: normal;
}
.ui-state-default-left-bottom, html .ui-button.ui-state-disabled:active
{
border-left: none;
border-bottom: none;
background: #fff;
font-weight: normal;
}
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; width: 20rem; }
#selectable li { padding: 0.3rem; float: left; width: 2rem; height: 2rem; font-size: 1.5rem; text-align: center; }
</style>
<ol id="selectable">
<li class="ui-state-default-left">01</li>
<li class="ui-state-default">02</li>
<li class="ui-state-default">03</li>
<li class="ui-state-default">04</li>
<li class="ui-state-default">05</li>
<li class="ui-state-default">06</li>
<li class="ui-state-default">07</li>
<li class="ui-state-default-left">08</li>
<li class="ui-state-default">09</li>
<li class="ui-state-default">10</li>
<li class="ui-state-default">11</li>
<li class="ui-state-default">12</li>
<li class="ui-state-default">13</li>
<li class="ui-state-default">14</li>
<li class="ui-state-default-left">15</li>
<li class="ui-state-default">16</li>
<li class="ui-state-default">17</li>
<li class="ui-state-default">18</li>
<li class="ui-state-default">19</li>
<li class="ui-state-default">20</li>
<li class="ui-state-default">21</li>
<li class="ui-state-default-left">22</li>
<li class="ui-state-default">23</li>
<li class="ui-state-default">24</li>
<li class="ui-state-default">25</li>
<li class="ui-state-default">26</li>
<li class="ui-state-default">27</li>
<li class="ui-state-default">28</li>
<li class="ui-state-default-left">29</li>
<li class="ui-state-default">30</li>
<li class="ui-state-default">31</li>
<li class="ui-state-default">32</li>
<li class="ui-state-default">33</li>
<li class="ui-state-default">34</li>
<li class="ui-state-default">35</li>
<li class="ui-state-default-left">36</li>
<li class="ui-state-default">37</li>
<li class="ui-state-default">38</li>
<li class="ui-state-default">39</li>
<li class="ui-state-default">40</li>
<li class="ui-state-default">41</li>
<li class="ui-state-default">42</li>
<li class="ui-state-default-left-bottom">43</li>
<li class="ui-state-default-bottom">44</li>
<li class="ui-state-default-bottom">45</li>
<li class="ui-state-default-bottom">46</li>
<li class="ui-state-default-bottom">47</li>
<li class="ui-state-default-bottom">48</li>
<li class="ui-state-default-bottom">49</li>
</ol>