Why is the icon still visible even with display: none?
.toc.item {
display: none;
}
<a class="toc item"><i class="sidebar icon"></i></a>
In addition to #GCyrillus I want to suggest right clicking the icon and choose "inspect element" in the browser. Look for your code. If it's striked through something else is overwriting your code. Search for a display that's not striked through to see what is messing it up. If you can't find your code the css file is not properly linked.
If you're having trouble overriding the code that's overriding yours in the first place, you might want to add !important to your code.
display: none !important;
The code provided here works. (you can see that by clicking run snippet)
My guess is you have not posted the full contents of your .css file and that you have another css entry contradicting what you are doing here.
Nothing wrong with your code. Check if your CSS is correctly linked to your document or if another rule is overriding it.
Related
In Blazor razor page if I place an HTML anchor such as
My Text
the text doesn't show until the mouse is moved over it.
I have worked around this by making it a Button.
Is there any solution to this or or better linkage component to use?
I cannot reproduce this in a new project.
The behaviour seems to suggest this might be a CSS problem. To confirm this, try giving your a an id and set a specific style
#tester {
visibility: visible;
display: inline-block;
color: white;
background-color: red;
font-size: 1rem;
}
Then
<a id="tester" href="http://example.com">My Text</a>
When you run the app you should now hopefully see the link. Right-click it, and select "Inspect Element", then look down the CSS rules for that element for anything that has a strike-through font (meaning it has been overridden by a more specific rule).
One of these should be something hiding your element. Once you've found the culprit, kill it :)
I have a problem I try to hide date comment on my blog but didn't work can someone help please
Can you post a piece of code of what you tried ?
Because hiding and showing HTML elements is not a very hard thing to do, so it could be the placing of the hide/show statement or it could be the syntax.
It is difficult to tell what is happening without seeing the code.
On Blogger. To hide data comment you need to target the element .datetime
Because there is already a display attribute specified to .datetime.secondary-text in your snipped code, You can change this attribute from display: inline-block to display: none or use the following CSS rule to override the existing one.
.comment .datetime.secondary-text { display: none }
I am using the following code to toggle my mobile navigation
html
<p>toggle</p>
I have a function which attaches the proper code/css and just need it to act as a button but not go anywhere (hence the '#').
However I want nothing to show up when it clicks/hover, since the browser usually indicates where the link is going, I don't want that (or anything else) to show
As Michael suggested, why not try using a button instead? Your code would look like this
<button class="toggle-nav"><p>toggle</p></button>
All you'd have to do is change any CSS/JS you have to reference the button instead of an a tag.
You may style the link with pointer-events.
.toggle-nav {
pointer-events: none
}
<p>toggle</p>
My english is not to much good, and i dont know to describe this problem good.
I have some blog on Blogger and I was install some free theme. I dont want to my name (author info) is on whole blog, but there is no button to check it off, I must do it trough HTML editor.
I found and delete it from most of places on blog, but I cant delete it from some header "slideshow"
I try to find it via "inspect elements" option, to find some familiar word there and search it in html. I know to I cant build web site if I dont know main steps, but I always stuck on some stupid things.
<span class="recent-author">Alexandar Sh</span></div>
This part make me trouble, maybe I looks stupid, but I am :D . I am total amateur with this and I dont know what to do to I dont get this anymore.
screenshot
One more Screenshot
This "recent" probably activate this option to work to show slideshow (not moving images <[One more screenshot][3]>) so when I type that "display: none" option, I block all "widget"
Thanks for help!
I got idea (didnt know to that is possible) and add tag to widget part of code. (before I add this, what you add me, after first Style tag. I didnt see before to there is more style tags. So you help me both. I use tag becouse Rico tell me that, and put code what Derek gave me.
Thank you.
You should have access to a .css CSS file. That is the 'Styles' for your site. (.html is the markup/content`) etc. ~ If you can find a place that has CSS rules... you could add:
.recent-author {
display: none;
}
For reasons I'm not going to try and explain here... you may also need to add this:
.recent-author {
display: none !important;
}
Try adding this line in any of your Css files:
span.recent-author {
display: none;
}
If you don't have any Css file / don't have access to any just add an inline style tag in your html file:
<style>
code from above
</style>
This should remove your author span tag.
It's an easy question and I've done it several times before, but for some reason, it's not working this time. I have an image and when a user hovers it, a description should show.
HTML:
<div class="description custom">
<a class="description_help_text" href="">
<img src="../../misc/help.png">
<span>Bla bla bla.</span>
</a>
</div>
CSS:
div.description a.description_help_text span {
display: none;
}
div.description a.description_help_text a:hover span {
display: block;
}
But for some reason, it's not working. I'm guessing some kind of stupid syntax I'm overlooking right now.
And a second question, is it possible to use a a-tag without linking it? So a user can click on it as much as he wants, but with no actions from the browser?
I think the latter CSS block should be
div.description a.description_help_text:hover span {
display: block;
}
For the links without action I recommend using
link
Your CSS should work fine, so my guess is that you have a parent class somewhere which is affecting it. Try looking through the ascendent styles in Firebug.
Re. your second question, you can supply no href value to an anchor element, but this may still cause the page to jump when the link is clicked, and IIRC it is not valid HTML. An alternative is to link to javascript:void(0);, although this is rather ugly IMO.
The only way to fully prevent any link behaviour is to create a link handler for the element in javascript and place event.preventDefault(); within it.
This seems to work for me: http://jsfiddle.net/qVK6f/
to answer your second question at least, try:
click