My HTML code is very simple:
<div class='mydiv'>
<a href='#'>Link</a>
<div>
As for the CSS:
div.mydiv { height: 200px; width: 200px; background-color:red; }
div.mydiv a { display:block; color:yellow; background-color:green; }
I am facing an issue where the anchor link only occupies the top line of the div, even though I added 'display:block;' to my CSS.
Can someone please help me understand what I am doing wrong and provide a solution? Thanks!