This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > July 2004 > display: none;
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| I'm using a style to hide a skip navigation link but it's not working out
correctly. The style is:
..textBrowsersOnly {
display: none;
}
I'm using it in a paragragh and in a navigation link but the navigation link
still shows up (using an un-ordered list).
www.fape.org/zzzzzz.htm
www.fape.org/css/styleCSS1.css
Please advise.
Thanks,
--
JayB
| |
|
| JayB wrote:
> I'm using a style to hide a skip navigation link but it's
> not working out correctly. The style is:
> .textBrowsersOnly {
> display: none;
> }
>
> I'm using it in a paragragh and in a navigation link but
> the navigation link still shows up (using an un-ordered
> list).
>
> www.fape.org/zzzzzz.htm
> www.fape.org/css/styleCSS1.css
>
> Please advise.
You told the browser to not display the paragraph with class
"textBrowsersOnly". But what is displayed is the <a> element
inside it.
I didn't test, but changing the CSS to:
..textBrowsersOnly a{
display: none;
}
might help.
Be aware that speech browsers might also honour the
display:none, by not reading the link...
--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
| |
|
| Els wrote:
> You told the browser to not display the paragraph with class
> "textBrowsersOnly". But what is displayed is the <a> element
> inside it.
Please substitute 'paragraph' with <li> element :S
--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
| |
|
|
"Els" <els.aNOSPAM@tiscali.nl> wrote in message
news:Xns952BB73318DFDEls@130.133.1.4...
> Els wrote:
>
>
> Please substitute 'paragraph' with <li> element :S
Thanks Els,
--
JayB
| |
| Harlan Messinger 2004-07-19, 7:16 pm |
|
"JayB" <jerry280@yahoo.com> wrote in message
news:m2SKc.324$i44.49@news01.roc.ny...
> I'm using a style to hide a skip navigation link but it's not working out
> correctly. The style is:
> .textBrowsersOnly {
> display: none;
> }
>
> I'm using it in a paragragh and in a navigation link but the navigation
link
> still shows up (using an un-ordered list).
>
> www.fape.org/zzzzzz.htm
> www.fape.org/css/styleCSS1.css
You have two selectors leading to display properties that apply to the
textBrowsersOnly LI:
.textBrowsersOnly { display: none; }
followed later by
.horiznav li { display: inline; }
If the latter selector has a higher "specificity", as defined in the CSS
specification, then it will prevail. If the two selectors have the same
specificity, then the later one will override the earlier one.
As it happens, the specificity of the first selector is 10, and that of the
second selector is 11, so the actual display is inline. You can fix this by
making the first selector a tad more specific:
li.textBrowsersOnly { display: none; }
to give it specificity 11, and then moving it *after* the second one. Or you
can make it more specific still by changing it to
.horiznav li.textBrowsersOnly { display: none; }
giving it specificity 21, and then you don't have to move it--though you
might want to, because it just makes organizational sense for
.horiznav li.textBrowsersOnly
to be listed after
.horiznav li
| |
|
|
|
|
"Stan Brown" <the_stan_brown@fastmail.fm> wrote in message
news:MPG.1b65ca806edd58898c778@news.odyssey.net...
> "JayB" <jerry280@yahoo.com> wrote in
> comp.infosystems.www.authoring.stylesheets:
link[color=darkred]
>
> I'll bet you're running up against specificity rules. Yep, Mozilla'
> DOM Inspector points out that "Go to Content" is governed by
> .textBrowsersOnly but also by .horiznav li -- and the latter is more
> specific.
>
> By the bye -- Do you have any say on that logo? Using the
> Danish/Norwegian A-with-ring for an English-language acronym looks
> pretty odd, like putting an acute accent on the "a" in
> "Educational".
Actually, the A in the logo represents a parent and the white inside
represents a child. I have no say though, it was created before I came here.
--
JayB
| |
|
| In message <m2SKc.324$i44.49@news01.roc.ny>, JayB <jerry280@yahoo.com>
writes
>I'm using a style to hide a skip navigation link but it's not working out
>correctly. The style is:
>.textBrowsersOnly {
> display: none;
>}
>
>I'm using it in a paragragh and in a navigation link but the navigation link
>still shows up (using an un-ordered list).
>
>www.fape.org/zzzzzz.htm
>www.fape.org/css/styleCSS1.css
>
>Please advise.
>
>Thanks,
>
>--
>JayB
>
>
Good idea -- but wrong technique.
I'm afraid that most screen-readers, talking-browsers, etc. will honour
the 'display:none' and ignore any text within the scope of
..textBrowsersOnly
There are other CSS-based techniques that work to a greater or lesser
degree, such as using CSS to position the text away from the browser
viewport.
If you get stuck, the "alternative text on a 1-pixel .gif" hack always
works ;-)
regards.
--
Jake
| |
| Rob Collyer 2004-07-19, 7:16 pm |
| "JayB" <jerry280@yahoo.com> wrote in
news:QLTKc.312$Gg7.106@news02.roc.ny:
>
> "Stan Brown" <the_stan_brown@fastmail.fm> wrote in message
> news:MPG.1b65ca806edd58898c778@news.odyssey.net...
> link
>
> Actually, the A in the logo represents a parent and the white inside
> represents a child. I have no say though, it was created before I came
> here.
>
> --
> JayB
>
>
>
A good quote: If it's confusing for one person.... it's confusing for
others.
--
Robert Collyer
www.webforumz.com
Free Web Design and Development Help, Discussions, tips and Critique!
ASP, VB, .NET, SQL, CSS, HTML, Javascript, Flash, XML, SEO !
| |
| Harlan Messinger 2004-07-19, 7:16 pm |
|
"Rob Collyer" <webforumz@webforumz.com> wrote in message
news:Xns952BC92F9772Bwebforumzwebforumzco@217.32.252.50...
> "JayB" <jerry280@yahoo.com> wrote in
> news:QLTKc.312$Gg7.106@news02.roc.ny:
>
>
> A good quote: If it's confusing for one person.... it's confusing for
> others.
Then we would never have logos at all. There isn't any graphical device you
can find that won't confuse at least one person in the world.
FWIW, I understood immediately what the A depicted when I looked at it.
| |
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|