CSS - Hide the Text [duplicate] - html

This question already has answers here:
Hide text in html which does not have any html tags [duplicate]
(3 answers)
Closed 2 years ago.
I want to hide the text..
<div id: "hideen_text"
<a href="http://localhost:3000/photos/12.html">
<img src="https:0f25438da28b758ea0a65d69c188e505.jpg" width="2500" height="1685">
1758345.jpg (I WANT TO HIDE THIS ONE)
</a>
</div>
Any Clue for this? THX

Hiding the complete div would be:
<div style="display: none">
Hiding just the text in the div would be this:
<div>
<a href="http://localhost:3000/photos/12.html">
<img src="https:0f25438da28b758ea0a65d69c188e505.jpg" width="2500" height="1685">
<div style="display:none">1758345.jpg</div>
</a>
</div>

In your CSS, use:
#hideen_text {
display: none;
}

Related

Is there a way to apply CSS to data- attributes? [duplicate]

This question already has answers here:
How do I target elements with an attribute that has any value in CSS?
(3 answers)
Closed 2 years ago.
I am trying to apply my custom css style to only one anchor link in the div block.
<div class="grid">
<div class="zoom">
<a href="" class="card" data-entity-type="layout" data-entity-id="3">
<a href="" class="card" data-entity-type="flex" data-entity-id="3">
<a href="" class="card" data-entity-type="slim" data-entity-id="3">
</div>
</div>
// This applies to all links,
<style>
div.grid>.zoom>a.card {width:100px !important;display:block}
</style>
But, I would like to apply above css to only data-entity-type="layout". How to implement ? I don't want to use first:child-nth because the data-entity-type="layout" will not always come first.
You can use attribute selectors. It looks like this:
a[data-entity-type="layout"] {
/* css here */
}
Attribute selectors can be generic or specific.
Also, check this post for more on attribute selectors: How do I target elements with an attribute that has any value in CSS?

Select a text element for styling [duplicate]

This question already has answers here:
Hide text in html which does not have any html tags [duplicate]
(3 answers)
Targeting text nodes with CSS
(2 answers)
Closed 3 years ago.
I have this situation:
<a href="...">
<span>
<svg>...</svg>
A label
</span>
</a>
How can I select the "A label" text element (being the second child of the span element) in order to style it?
Is is possible somehow?
Set styles for the span element, and unset for its children:
.aSpan{
color: red;
}
.aSpan > *{
color: initial;
}
<a href="#">
<span class="aSpan">
<div>Not this</div>
This
</span>
</a>

How to center content within columns on Bootstrap 3 [duplicate]

This question already has answers here:
Bootstrap: How to center align content inside column? [duplicate]
(2 answers)
Closed 6 years ago.
I have this code:
<div class="article-quiz-content.container">
<div class="row">
<div class="col-xs-6.quiz-cols">
<div class="true-placeholder">
<a class=icon-true-shape amenitie_icon" href="#" data-answer="true">
</div>
</div>
<div class=col-xs-6.quiz-cols">
<div class="false-placeholder">
<a class="icon-false-shape amenitie_icon" href="#" data-answer="false">
</div>
</div>
</div>
</div>
Which leads to this:
I need those icons to be in the center of the columns.
Suggestions?
Just add class text-center to your columns (.col-xs-6)
Reference: https://getbootstrap.com/css/#type-alignment
EDIT: after you changed markup you need to add it to placeholder divs
You can do something like this in your css:
.quiz-cols{
text-align: center;
}
.amenitie_icon{
display: inline-block;
}
Inline-block element float to center if container has text-align: center

Centering <a> element with an image inside a div [duplicate]

This question already has answers here:
How to make an image center (vertically & horizontally) inside a bigger div [duplicate]
(36 answers)
Closed 6 years ago.
How do I force my <a> element with an image appear in center of my div? And should I try to center an a element first, so it work out?
<div class="col-md-6 logo">
<a class="navbar-brand" href="/index.html">
<img src="#">
</a>
</div>
try style="text-align:center" :
<div class="col-md-6 logo" style="text-align:center">
<a class="navbar-brand" href="/index.html">
<img src="#">
</a>
</div>
put your img a class like
In css
img.example { margin : auto; }
Problem solved, navbar-brand has
float:right
by default. so i shanged it to
:none;
and
text align: center;

No space between </i> and <span> [duplicate]

This question already has answers here:
How to remove the space between inline/inline-block elements?
(41 answers)
Closed 7 years ago.
I have 2 images, only the first image is visible, on hover a menu-bar will slide to the right and then it shows the 2nd picture right next to the 1st image, but there is a little space between the images. Is there a way how I can fix this?
This is the HTML code I have:
<!-- Side Header -->
<div class="side-header side-content bg-white-op">
<a class="h5 text-white" href="index.html">
<i><img src="assets/img/test.png" height="25px"></i> <span class="sidebar-mini-hide"><img src="assets/img/logo.png" height="25px"></span>
</a>
</div>
<!-- END Side Header -->
.side-header a i, .side-header a span { float: left; }