Side Links

Note that for these various examples I am using the class of sideLinks and then adding a number for each following example to separate the styling from one example to the next.

sideLinks


So I have the 'hover' property giving a different color to the background, but it is limited to the size of the text. I would like it to expand to the orange 'border' in all four directions.

sideLinks2


About

Background >

History

With the addition of .sideLinks2 a { display: block; } the background extends side to side, but not vertically.

sideLinks3


About

Background >

History

Changing the anchor definition to .sideLinks3 a { margin: 0; padding: 0.5em 0em; } (removing the display:block) we get it working vertically but not horizontally.

sideLinks4


About

Background >

History

Combining the sideLinks2 and sideLinks3 .sideLinks4 a { margin: 0; padding: 0.5em 0em; display: block; } (removing the display:block) we get the background filling completely, but uneven <P> spacing.

sideLinks5


About

Background >

History

I've tried to even out the spacing by reducing the padding in .sideLinks5 p { padding: 0; } to zero. But again, vertical spacing is uneven between the links and non-links. This example is the closest I have gotten. It was suggested I add in a .sidelinks5 { margin: 0; padding: 0; } but it doesn't seem to help any.

sideLinks6


About

Background >

History

Does it work? No. This is just a more complicated way of getting the results in sideLinks2.

I tried reducing the padding when an A followed a P. .sideLinks6 p a { padding: 0; }. I think I need the opposite. Something like sideLinks5, but adding padding when there is a P not followed by an A. But I don't think you can have .sideLinks5 p !a { padding: 0.5em 0em; }

sideLinks6


About

Background >

History

Hmm.... .sideLinks7 p !a { padding: 0.5em 0em; }. Not valid CSS.



Created and maintained by Jeff Shepherd
<http://www.aShep.com/test/sideLinks.html>
This page created: 12/7/04 jks, rendered: 12/23/04
using Radio UserLand and BBEdit on a Macintosh
Valid CSS! Valid HTML 4.01!