I am modifying a skin for the CKEdit component so that the toolbar is hidden unless clicked. To do so, I moved the toolbar collapser to the row below it using position: relative and top:18px.
My goal is to have the parent tr of the anchor element a height of 2px, but keep the anchor at 11px. Is this possible? I cannot alter the DOM, just the styles.
Here's my reduced code
<style type="text/css">
table { width: 80px;}
td { border: solid 1px #ccc; }
.header
{
background-color: #99f;
/* This is being ignored */
height:2px;
}
.below
{
float: right;
position: relative;
top: 18px;
/*If I shrink, the BG image goes Away*/
height: 11px;
width: 11px;
background-image: url('http://ckeditor.com/apps/ckeditor/3.3/skins/kama/images/sprites.png');
background-position: 4px -1387px;
border: 1px outset #D3D3D3;
}
.hidden { display:none; }
</style>
<table>
<tr><td class="header"><a class="below"><span class="hidden">#</span></a></td></tr>
<tr><td>next row</td></tr>
</table>
am reposting new code per the suggestions below. This shows the arrow at the top right of the page now
<style type="text/css">
table { width: 80px; position:relative;}
td { border: solid 1px #ccc; }
.header
{
position: relative;
background-color: #99f;
/* This is being ignored */
height:2px;
}
.below
{
float: right;
position: absolute;
top: 6px;
right: 2px;
/*If I shrink, the BG image goes Away*/
height: 11px;
width: 11px;
background-image: url('http://ckeditor.com/apps/ckeditor/3.3/skins/kama/images/sprites.png');
background-position: 4px -1387px;
border: 1px outset #D3D3D3;
}
.hidden { display:none; }
</style>
<br /><br /><br /><br /><br /><br />
<table>
<tr><td class="header"><a class="below"><span class="hidden">#</span></a></td></tr>
<tr><td>next row</td></tr>
</table>
Edit (per comments):
If I add a relatively positioned div between the anchor and the cell, I can achieve the results, but again, I can't modify the DOM.
<td class="header">
<div style="position:relative; ">
<a class="below"><span class="hidden">#</span></a>
</div>
</td>