468,133 Members | 1,226 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,133 developers. It's quick & easy.

display: none;

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
Jul 20 '05 #1
10 3050
Els
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 vo. O resto imperfeito.
- Renato Russo -
Jul 20 '05 #2
Els
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 vo. O resto imperfeito.
- Renato Russo -
Jul 20 '05 #3

"Els" <el*********@tiscali.nl> wrote in message
news:Xn*****************@130.133.1.4...
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


Thanks Els,

--
JayB
Jul 20 '05 #4

"JayB" <je******@yahoo.com> wrote in message
news:m2**************@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

Jul 20 '05 #5
"JayB" <je******@yahoo.com> wrote in
comp.infosystems.www.authoring.stylesheets:
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


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".

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #6

"Stan Brown" <th************@fastmail.fm> wrote in message
news:MP***********************@news.odyssey.net...
"JayB" <je******@yahoo.com> wrote in
comp.infosystems.www.authoring.stylesheets:
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 linkstill shows up (using an un-ordered list).

www.fape.org/zzzzzz.htm
www.fape.org/css/styleCSS1.css


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
Jul 20 '05 #7
In message <m2**************@news01.roc.ny>, JayB <je******@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
Jul 20 '05 #8
"JayB" <je******@yahoo.com> wrote in
news:QL***************@news02.roc.ny:

"Stan Brown" <th************@fastmail.fm> wrote in message
news:MP***********************@news.odyssey.net...
"JayB" <je******@yahoo.com> wrote in
comp.infosystems.www.authoring.stylesheets:
>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


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


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 !
Jul 20 '05 #9

"Rob Collyer" <we*******@webforumz.com> wrote in message
news:Xn**********************************@217.32.2 52.50...
"JayB" <je******@yahoo.com> wrote in
news:QL***************@news02.roc.ny:

"Stan Brown" <th************@fastmail.fm> wrote in message
news:MP***********************@news.odyssey.net...
"JayB" <je******@yahoo.com> wrote in
comp.infosystems.www.authoring.stylesheets:
>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

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.


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.

Jul 20 '05 #10
"JayB" <je******@yahoo.com> wrote in
comp.infosystems.www.authoring.stylesheets:
Actually, the A in the logo represents a parent and the white inside
represents a child.
Well, if you say so. Even after your explanation, it doesn't look
anything like that to me.
I have no say though, it was created before I came here.


Understood.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by dmiller23462 | last post: by
3 posts views Thread by shreddie | last post: by
3 posts views Thread by Scott | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.