473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Is it not possible to override CSS visibility.?

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
4 4821
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jonathan | last post by:
Hi, I've read through quite a number of postings on here so far and have seen what look like very simply, reasonable answers to this question, however I am still completely unable to do what I...
3
by: Jukka K. Korpela | last post by:
I have noticed that the meaning of visibility: collapse has been discussed on different forums, but with no consensus on what it really means. Besides, implementations differ. The specification...
12
by: lawrence | last post by:
The following function correctly makes everything invisible but then fails to turn the one chosen DIV back to visible. I imagine I'm getting the syntax of the variable wrong? I've tried this with...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
14
by: JPRoot | last post by:
Hi I use the following syntax to have events inherited from base to child classes which works nicely (virtual and override keyword on events). But I am wondering if it is a "supported" way of using...
4
by: Jazper Manto | last post by:
hi what is the difference between virtual / override and new? until now i only knew the virtual / override thing. thanx for hint. Jazper //--- new ----------------------------------------...
5
by: GS | last post by:
Guys: I have a question, Is it possible to implement pop-up window without Java script, we don't want to use java script since it might get blocked by pop-up blocker. Thanks in advance. GS.
13
by: Ben Voigt | last post by:
Is there any way to have an overridden method which is not callable from the assembly overridding it? A contrived example (though I want this feature, my program has nothing to do with food...
5
by: =?Utf-8?B?V0o=?= | last post by:
If I have a class A that has a virtual public function DoSomething() Class A { public: virtual void DoSomething(); } then I override this function to protected is class B Class B: public...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.