By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,991 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

Is it not possible to override CSS visibility.?

P: n/a
I have a very simple stylesheet attached to an html file as below.

body {color: darkgray; visibility: hidden}
span {color: black; visibility: visible}

The objective is to only display text within span tags. However when I
render the html nothing is visible so it would seem that that the
visibility override on the span tags is not taking effect.

Can anybody shed light on this?
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
wooks wrote:
I have a very simple stylesheet attached to an html file as below.

body {color: darkgray; visibility: hidden}
span {color: black; visibility: visible}

The objective is to only display text within span tags. However when I
render the html nothing is visible so it would seem that that the
visibility override on the span tags is not taking effect.

Can anybody shed light on this?


Should work except in Opera (bug).

--
Spartanicus
Jul 20 '05 #2

P: n/a
Spartanicus wrote:
body {color: darkgray; visibility: hidden}
span {color: black; visibility: visible}


Should work except in Opera (bug).


On second thought, setting body to invisible may cause problems.

--
Spartanicus
Jul 20 '05 #3

P: n/a
In article <88**************************@posting.google.com > in
comp.infosystems.www.authoring.stylesheets, wooks
<wo****@hotmail.com> wrote:
I have a very simple stylesheet attached to an html file as below.

body {color: darkgray; visibility: hidden}
span {color: black; visibility: visible}

The objective is to only display text within span tags. However when I
render the html nothing is visible so it would seem that that the
visibility override on the span tags is not taking effect.

Can anybody shed light on this?


Gee, if only you'd given us a URL. I might have tinkered a bit with
_your_ example, but I'm not motivated enough to construct one myself
from scratch.

Failing that, I can only suggest you tinker with specificity by
replacing "span" with "body span". Maybe that will do it.

--
Stan Brown, Oak Road Systems, Cortland 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 #4

P: n/a
Stan Brown <th************@fastmail.fm> wrote in message news:<MP************************@news.odyssey.net> ...
In article <88**************************@posting.google.com > in
comp.infosystems.www.authoring.stylesheets, wooks
<wo****@hotmail.com> wrote:
I have a very simple stylesheet attached to an html file as below.

body {color: darkgray; visibility: hidden}
span {color: black; visibility: visible}

The objective is to only display text within span tags. However when I
render the html nothing is visible so it would seem that that the
visibility override on the span tags is not taking effect.

Can anybody shed light on this?


Gee, if only you'd given us a URL. I might have tinkered a bit with
_your_ example, but I'm not motivated enough to construct one myself
from scratch.

Ok here's some html to test the stylesheet with (haven't got a url).

<html>
<head>
<link rel="stylesheet" type="text/css" href="test.css">
</head>
<body>hello <span>world</span></body>
</html>
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.