![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
given a block element with some content and a link, is it possible to set this element display to none by CSS only? |
|
It has to be done only once. |
|
It is an absolutely positionned element so visibility:hidden will do as well. |
|
div p>Some content</p p><a href="#">Hide</a></p /div |
#3
| |||
| |||
|
|
Scripsit VK: given a block element with some content and a link, is it possible to set this element display to none by CSS only? Of course. You just set display: none for the element. The correct answer to the question you ask in the Subject line is "No." There is no CSS selector related to clicking. |
#4
| |||
| |||
|
|
Hi, given a block element with some content and a link, is it possible to set this element display to none by CSS only? It has to be done only once. It is an absolutely positionned element so visibility:hidden will do as well. div p>Some content</p p><a href="#">Hide</a></p /div |
#5
| |||
| |||
|
|
You probably be able to do it eventually with CSS3 selectors: <style type="text/css" p#note:target {display: none} </style ASDFG <p id="note"><a href="#note">Hide</a></p ZXCVB This works in Firefox 2. |
#6
| ||||
| ||||
|
|
The correct answer to the question you ask in the Subject line is "No." There is no CSS selector related to clicking. a:hover a:active a:visited ? |
|
p><a href="#">Hide</a></p /div You do realize, don't you, that in HTML terms the link points to the start of the current document, instead of being a no-op. Moreover, I even know that these funny words in brackets are called T-A-G's and you do stuff with them in ... that's the difficult one... H-T-M-L |
|
Anyway, I needed a warning in <noscript> user could remove from the screen but only after having read it. |
|
span>Client-side scripting is disabled.<br Some extended features of this page will be not available.</span><br |
#7
| |||
| |||
|
|
a:hover a:active a:visited ? What makes you think any of them relates to clicking? If you actually _meant_ hovering or activation (whatever that means - the specs don't say) or having been visited, why did you write about clicking? |
|
You do realize, don't you, that in HTML terms the link points to the start of the current document, instead of being a no-op. Moreover, I even know that these funny words in brackets are called T-A-G's and you do stuff with them in ... that's the difficult one... H-T-M-L Your willingness to look amusing seems to exceed your willingness to learn the basics of HTML. You are _still_ using href="#" in your code snippet, apparently without ever considering what happens when the link is actually used the way links are meant to be used. By clicking on it, for example. |
|
That's simply pointless. Either you make your page work with scripting disabled, or you don't. In rare cases, you might have reasons to explain _what_ the user is actually missing when scripting is off, but what you seem to work with is worse than useless technobabble and irritation: |
#8
| ||||
| ||||
|
|
Moreover, I even know that these funny words in brackets are called T-A-G's |
|
and you do stuff with them in ... |
|
that's the difficult one... H-T-M-L As you can see I'm rather well prepared, but still thank you for taking your time to explain. ;-) |

|
|| hexadecimal EBB o-o decimal 3771 |
![]() |
| Thread Tools | |
| Display Modes | |
| |