See example at https://jsfiddle.net/x7znc405/1/
If I have html like
<div id="wrapper">
<a>
<div id="content">
Hello World
</div>
</a>
</div>
css
#content {
background-color: blue;
width: 100%;
height: 100%
}
a {
width: auto;
height: auto;
}
#wrapper {
display: inline-block;
height: 39px;
width: 200px;
}
The a
tag appears to not have any effective width or height. I can click on it in a browser, and it works fine.
The reason I care is that it means I have to use force:true
to convince Cypress that the tag is visible and can be clicked, which obviously opens me up to issues where the tag is genuinely invisible.
Is there any way of me getting the a
to 'grow' to fill the parent div?