I have come across the following problem: i wish to hide the "..." that are displayed within the .footer
div after the link, as shown in the picture below.
Only caveat: I can only use CSS to do so.
Can anybody tell me how to achieve this please?
I have come across the following problem: i wish to hide the "..." that are displayed within the .footer
div after the link, as shown in the picture below.
Only caveat: I can only use CSS to do so.
Can anybody tell me how to achieve this please?
you can use visibility:hidden
in div
parent and visibility: visible
in child a
div {
visibility: hidden
}
div a {
visibility: visible
}
<div class="footer">
<a href="#">All courses</a>
...
</div>
other approach is font-size:0
div {
font-size: 0
}
div a {
font-size: initial
}
<div class="footer">
<a href="#">All courses</a>
...
</div>
From my comment about the use of font-size
:
div {
font-size: 0;
border:solid;
}
div * {
font-size: 1rem;
margin:0.25em;
}
<div><a href="#">link to see</a> "text to hide "<a href="#">link to see</a>
<p>some more text here</p>
"Also some text to hide "
</div>
The only way I can think of hiding content within a div is using this although it will also hide everything else contained within the div. If this is not what you hope to achieve please elaborate more.
.footer {
visibility: hidden;
}
<div class="footer">
"..."
</div>
.wraper p {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 1.3em;
}
<div class="wraper">
<a href="#">All courses</a>
<p> Lorem ipsum</p>
</div>