473,322 Members | 1,352 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,322 software developers and data experts.

DIV with browser default colors?

Hi,
maybe you guys know something I don't know...

Is it possible (and how) to achieve the following:

1) A <BODY> with specific background-color, say blue.

2) A <DIV class='main'> (which contains the main content text of the page)
with no colors assigned at all.

The idea is that the 'main' class would be presented to the reader with the
browser's default color sheme. This is usually black on white but could be
anything. I'd like to grant the reader the freedom to select their own
colors for the content of the page, so I don't want to set it to
black/white explicitly in my style sheet. I would still like to play a
little with colors on the rest of the page, i.e. menus, title bar, footer,
space between these elements.

Problem is: If I don't set colors for the 'main' class, the background-
color of body shines through or is inherited.

Any ideas?
Marc
Jul 20 '05 #1
3 3570
Marc wrote:
Hi,
maybe you guys know something I don't know...

Is it possible (and how) to achieve the following:

1) A <BODY> with specific background-color, say blue.

2) A <DIV class='main'> (which contains the main content text of the page)
with no colors assigned at all.

The idea is that the 'main' class would be presented to the reader with the
browser's default color sheme. This is usually black on white but could be
anything. I'd like to grant the reader the freedom to select their own
colors for the content of the page, so I don't want to set it to
black/white explicitly in my style sheet. I would still like to play a
little with colors on the rest of the page, i.e. menus, title bar, footer,
space between these elements.

Problem is: If I don't set colors for the 'main' class, the background-
color of body shines through or is inherited.

Any ideas?


18.2 User preferences for colors
<URL:http://www.w3.org/TR/REC-CSS2/ui.html#system-colors>

--
Steve

Freedom is the right to be wrong, not the right to do wrong.
-John G. Diefenbaker
Jul 20 '05 #2
Jim Dabell <ji********@jimdabell.com> wrote in news:p-
mc******************@giganews.com:
Marc wrote:

[snip]
The idea is that the 'main' class would be presented to the reader with
the browser's default color sheme. This is usually black on white but
could be anything.

[snip]

Browser support varies, but check out "user preferences for colors":

<URL:http://www.w3.org/TR/REC-CSS2/ui.html#system-colors>

There's nothing that specifically talks about browser defaults, but you
might want to experiment with the 'window' and 'windowtext' colours.


Thanks for your answer, Jim.

I have already heard of the system colors thing. Haven't tried it yet. Has
anybody? How is it supported by current browsers?

However, it doesn't do what I want exactly: Have a DIV with the browser
default colors on a colored body.

Any other suggestions?
Jul 20 '05 #3
"Steve Fulton" <ce********@hotmail.com> wrote in
news:Xr*******************@news20.bellglobal.com:
Marc wrote:

The idea is that the 'main' class would be presented to the reader
with the browser's default color sheme. This is usually black on
white but could be anything. I'd like to grant the reader the freedom
to select their own colors for the content of the page, so I don't
want to set it to black/white explicitly in my style sheet. I would
still like to play a little with colors on the rest of the page, i.e.
menus, title bar, footer, space between these elements.


18.2 User preferences for colors
<URL:http://www.w3.org/TR/REC-CSS2/ui.html#system-colors>


Thanks, Steve.

The system colors, however, seem to be the colors set by the user for the
GUI environment, i.e. windows or kde or whatever. I would like to use the
default rendering colors which are set for the browser. They can actually
be different from the system colors.

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Szar | last post by:
JS noob. I've seen plenty of browser detection scripts but they all seem to be slightly different and don't really fit my needs. I have various places where if the browser is IE I'd like to display...
7
by: Michael Winter | last post by:
As many of you know, IE has poor support for CSS 2, including the dynamic pseudo-class, :hover. This could easily be emulated with an intrinsic event, but how can you tell that it's required? You...
5
by: Dan Jacobson | last post by:
What's Nielsen talking about in http://www.useit.com/alertbox/20040503.html http://www.useit.com/alertbox/20040510.html Can't a good browser keep track of visited vs. unvisited link colors? Is my...
34
by: Marian Aldenhövel | last post by:
Hi, I am in the process of embarking on building a large web application. I wanted to seize that opportunity to learn how to use CSS and get rid of my ad-hoc approach to HTML-coding (i.e.: add...
16
by: Java script Dude | last post by:
To all Mozilla JS Guru's (IE dudes welcome), I have spent the last three years developing complex DHTML applications that must work in IE 5.5sp2+ but I use Mozilla 1.3+** to do all my...
14
by: Gérard Talbot | last post by:
I personally disagree with the Viewable in Any browser campain. The site is frankly outdated, seems to be no longer maitained, has several recommendations that don't make a lot of sense anymore. In...
0
by: davegb | last post by:
In my usual messing around, somehow I changed the default colors for tables, thinking I was changing only one table. Now I can't find how to change the default colors back to b&w. Can someone tell...
1
by: celoftis | last post by:
BACKGROUND: I have some PPT slides that have been converted to HTM (ensuring that the show slide animations while browsing checkbox is checked). The original HTM slides have custom animations to...
3
by: Jukka K. Korpela | last post by:
Some time ago in this group, someone suggested that we should develop a "different" user style sheet to demonstrate what a user style sheet or a browser style sheet _could_ do. I guess the idea was...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.