How to hide class=“” CSS

Tags: php,css

Problem :

I would like to hide this link using CSS:

<a href="<?php print $edit_link_location;?>"    class="<?php print $activelocation;?>">    <?php esc_html_e('Location','wpestate');?></a>  

The idea was to hide by its class like:

.class {

But there is the PHP that is confusing me.

How can I hide this? Thanks

Solution :

But there is the PHP that is confusing me.

PHP is simply printing the $activelocation variable/string out to your output (HTML). The problem is that $activelocation could be anything. We don't see the entire PHP script in your question, nor do I want to.

I would check the output/source ("View Source"/use Web Inspector) of the page, to see what PHP prints as the class name on your link and then hide/display:none that class.

Example: You look in the source/output and find <a href="/php/made/this/edit_link_location" class="php_also_made_this"> Now you can go ahead and hide the class ".php_also_made_this"

.php_also_made_this { 
  display: none; 

Just be careful. The class .php_also_made_this might be used elsewhere and you might be hiding things that you don't want to!

    CSS Howto..

    How to beautify this nested list with css?

    How to trigger the :active pseudoclass on keyboard 'enter' press? (using only CSS)

    Html/Css - How to get an image to stretch 100% width of a container then display another image over it?

    How to keep footer at the bottom of the page when resizing on bootstrap

    How to make CSS 3 columns stay in their posisiton?

    how to get a rounded corner table with a body in different color with CSS?

    how to format a single html a href text to have multiple css properties (two different font families)

    How do I add CSS (transition) to an item from a SVG file? [duplicate]

    How to align both vertically and horizontally in CSS?

    How to Troubleshoot CSS?

    How to create CSS file within PHP code [closed]

    How to vertically align text over an image

    CSS: How to set the width and height dependent on the screen/window size?

    how to place one div on top of another, when both are centered using auto margin?

    how to remove extra css and js link in twitter-bootstrap-rails

    How to use vertical align in bootstrap

    How to make jQuery target and attach a plugin call to hundreds of CSS ID's with an ID number at the end of them?

    How to get rid of !important tags?

    How to modify the link text(html link) properties using css

    How to position images next to text using CSS

    Best practice: How to use (repeat) CSS style attributes correctly?

    select tag in Google Chrome shows lowercase options

    How to gray out a HTML element

    How do I unset CSS values?

    How I can overlap a DIV on to other DIV?

    CSS while hover a div how to display other class(or) div?

    How to apply css just to element that curser is on?

    Show and hide table column using jQuery

    How to add offset border to image of unknown size?

    How to place two divs next to each other?