I need help removing this link and I feel like css would be the best way to do it. <span id="toTopHover" style="opacity: 0;"></span> Code (markup): I have tried both of these and none of these work :/ #toTopHover { display: hidden;} #toTopHover { display: none;} Code (markup): Thank you in advance for your help
Uhm... if it has "opacity: 0" it shouldn't show to begin with. This is an example on not showing us the whole thing, or the page in question - it doesn't really help. "display: none" should work as well, but since you haven't shown us where you're putting the CSS vs. the rest of the CSS-file, and what kind of other CSS you have pertaining to that particular span, it's very hard to help. Either show us the actual page, or all of the code for the page in question (both HTML and CSS).
Okay thanks, let me gather some more information for you guys to help me. It is one of the to top of page arrows in the footer of a page, that when you hover over it it fades from a dark color to a lighter color. But let me gather some solid info for you
If it is changing on hover then changing the rule with the id as the declaration may not help, because there is probably another rule with :hover specified. Also seeing an inline style attribute indicates the whomever wrote it is either incompetent or intentionally trying to make maintenance difficult to discourage removal of the link which sounds like it is part of either a scam ot some kind of blackhat SEO crap. The hover could also be getting fired from an even fired inline or from an event listener in a script. Why not just remove the span from the markup? Oh... it probably is coming from a theme or plugin; in which case you deserve the headache it is causing for using something that generates crap code.
It looks like some kind of wordpress issue. There's this whole nonsense going around that link, something like: <a href="#" title="<?php _e('To Top','smartblog'); ?>" id="toTop" onclick="return false;" style="display: inline;"><span id="toTopHover" style="opacity: 0;"></span><?php _e('To Top','smartblog'); ?></a> But it could be something else. If it is what you're dealing with, just change that style="display: inline;" to style="display: none;"
One problem I have had modifying Wordpress themes is overriding existing rules due to specificity. The best option is to use Firefox's (or another browser's) Web Developer Tools and see exactly what rule(s) apply to it and then attempt to override it using that. Or try using !important. Or a targeting selector (or combination) with a higher specificity score. https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity http://www.w3.org/TR/selectors/#specificity http://www.w3.org/TR/CSS2/selector.html
The link is being pulled in a cluster of other additions too. So I found the spot in the php where it says include whatever the function is, but when I remove that it also removes other things from the footer that area also being called from this hidden page. So what I did was view source code and then look for the id so I could remove it using my functions page or through css since I couldnt find where it was being called from
There's a legitimate use for it other than sleazing out a buggy broken inaccessible train wreck of developer ineptitude that takes advantage of ignorant halfwits not qualified to even HAVE a website in the first place? That said, @billzo probably hit it on the head, it's a specificity issue. You should probably use a document inspector like firebug to see if any OTHER ID's in the code are overriding or preventing what you are trying to set directly... or if the turdpress theme is vomiting up multiple instances of the same ID in some form of typical "I can haz intarnets" ineptitude so common to templates not even suited for use in the "dave test". With the endless pointless DIV for nothing, classes for nothing, and ID's for nothing thrown at EVERYTHING so common to wordpress templates thanks to the utter and complete ineptitude of the people writing skins for it, such issues on overriding even the simplest of elements is hardly uncommon. Remember, a parent ID can trump the element ID... which is why as nonsensical as saying: #parentWrapper #myElement { color:#000; } Should be, thanks to specificity you do sometimes end up having to say that -- that or you end up resorting to !important. (which you really shouldn't do) Specificity -- such a pain in the ass when people start slapping classes and ID's on things for no reason, it damned near needs it's own schoolhouse rock video.
Oh I found a use for it long ago. I use it in courses I teach to demonstrate how hype, adding the word "easy" to ads, and putting a slick marketing wrapper around crap can make junk popular and scam the gullible, ignorant and the lazy. At some point they discover, that every hour they save slopping a site together with WP costs them 10 hours over the lifetime of a site. On a professionally developed site following standards and "best practices" written with real coding in instead of a crap collection from theme farms it is a ten second change that gets assigned to part time intern. Instead you end up screwing around for days and require help to implement a change that should be a no-brainer.
That aptly describes all of Wordpress. There are some things that are missing that make you scratch your head. Every little thing you want to do requires a plugin because the developers of Wordpress will not build the functionality in the core. And I'm talking about simple things like being able to input HTML into a post without it being mangled by Wordpress' awful wpauto() function or the javascript/jQuery its TinyMCE editor uses, its almost-as-bad wptexturize() function...and I could go on. Wordpress is great for simple blog sites. As a CMS, it is severely lacking in the most basic features. But, I do like its menu system. And I won't mention how ridiculously bloated it is.