Forum Moderators: not2easy

Message Too Old, No Replies

White Backgrounds

just css?

         

Tiebreaker

6:22 pm on Oct 24, 2003 (gmt 0)

10+ Year Member



Hi

I'm new to this - and just using very basic css on my pages to control font size and colours etc.

I know that not all browsers support css - that doesn't matter to me - I don't really care if 1 person in a hundred gets to see the default font settings because they have an old browser - but I don't really want these people to possibly view my pages with a grey background.

So my question is this - is it possibly worth keeping the old ....

BODY BGCOLOR="#FFFFFF"

Is this a sensible 'safety net' - to at least make sure my page has a nice white background - even if my chosen font styles have gone?

I'm guessing that keeping a little bit of the old style mark up on my pages may have some negative implications that I'm not aware of - but I'm not sure!

DrDoc

6:38 pm on Oct 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Keeping the bgcolor attribute would work, especially if you have reason to believe that a lot of people will visit your page using an ancient browser.

Tiebreaker

7:02 am on Oct 25, 2003 (gmt 0)

10+ Year Member



Thanks - no reason to believe a large amount of my visitors will be using older browsers - just thought it might be an idea to do this until pretty much 100% of the planet is css enabled!

I was mainly concerned that having the old style code on my pages - even just a small snippet - may effect google rankings.

I believe the old style font tags are 'marked down' by Google - or am I wrong?

hartlandcat

10:47 am on Oct 25, 2003 (gmt 0)

10+ Year Member



I don't believe that Google marks down pages that are coded badly... yet. As long as it's coded well enough that the robot can get through.

mattur

2:10 pm on Oct 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't believe that Google marks down pages that are coded badly... yet.

Do you think Google will start doing this in the future? ISTM to be a bad idea in terms of giving users the best results for a search term.

kevinpate

2:18 pm on Oct 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> I believe the old style font tags are 'marked down'
> by Google - or am I wrong?

Let's just say I am extremely confident you can safely find you something different to believe in. 8^)

marek

2:35 pm on Oct 25, 2003 (gmt 0)

10+ Year Member



Tiebreaker, *never* mix the HTML attribute
bgcolor
with the CSS
color
property for the same element. People may have their own color settings and your pages can become unreadable. Always set both background and foreground color either via HTML or via CSS. Never mix them.

Nick_W

2:49 pm on Oct 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Marek, good point.

Let' keep the discussion on CSS please guys ;)

Nick

Tiebreaker

2:53 pm on Oct 25, 2003 (gmt 0)

10+ Year Member



Tiebreaker, *never* mix the HTML attribute bgcolor with the CSS color property for the same element. People may have their own color settings and your pages can become unreadable. Always set both background and foreground color either via HTML or via CSS. Never mix them ........

OK - just to clarify - Does that still apply if the CSS and HTML are both set to the same colour?

Just checking that you are not talking about having CSS set to one colour - and HTML set to a different one.

marek

6:41 pm on Oct 25, 2003 (gmt 0)

10+ Year Member



Tiebreaker, yes, it still applies even if the CSS and HTML are both set to the same colour. That's because a user can switch off the style sheets, or her browser doesn't support them, or external style sheet doesn't load, etc. It's one of the basic W3C WCAG (Web Content Accessibility Guidelines) rule: always ensure that the page is still readable withou the style sheets.

An example:

CSS:

body {
background-color: #fff;
color: #000;
}

HTML:

<body bgcolor="#ffffff">
...
</body>

Now suppose, that I have my browser set with white text on black background and it doesn't support stylesheets. I'll see white on white than.

If you use CSS to control colors, fonts, etc. you need not do the same in HTML. Leave users which do not support CSS with their own preferencies.

Tiebreaker

8:36 am on Oct 26, 2003 (gmt 0)

10+ Year Member



Thanks for explaining that marek - I get it now!

I will stick with just CSS