PDA

View Full Version : CSS gone mad!


Creative Insanity
02-09-2006, 09:38 PM
Ok for some reason my body in css is not showing on the pages what has been set for the css.

The body
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #3366FF;
margin:0;
}
The text is more like 18px than 10px. What could cause this to happen.
It was working but then DW crapped itself and then this problem.
No idea why, does anyone?
ta muchly

dthomsen8
02-09-2006, 09:41 PM
Are you sure you have given us all the styles? None lurking in a linked CSS, or deep in the code? That cascading effect can get tricky.

domedia
02-09-2006, 09:50 PM
That CSS rule is valid, nothing wrong with it.
Now.. what is your doctype?
If you dont use html 4 strict and you use tables, it's not going to be inherited into your TD's.

Creative Insanity
02-09-2006, 10:25 PM
Ahh.. Ok dom that could be it.. me test that.
Naa didn't work.. bummer.. doc type

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

ah huh!
Just replaced this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
and it now works.. thanks dom.. but damn I cannot have coloured scrolls with that in there.. bummer twice.


Yee haa!
Just needed to remove:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
and all works.. not a fan of coloured scrolls but the person I am doing the site for uses IE and requested them so ya gotta give what the man wants ah.

Creative Insanity
02-09-2006, 10:56 PM
Naa with that doc type in the colour scrolls don't work.. but with it out they do and no css.. this is a pain. Maybe I will have to format the text with a class rather than the table.

domedia
02-10-2006, 12:18 AM
use html 4.01 strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Creative Insanity
02-10-2006, 12:58 AM
Thanks dom but still kills the coloured scrolls.
I have setup another class to handle the text sizes so that should be cool.
Since I am using a template only need to use it once really.

ranjan
02-10-2006, 05:03 AM
use scrollbar styles on html rather than body

html {
scrollbar styles
}

Creative Insanity
02-10-2006, 06:10 AM
Oh ok.. ta once again rj. Not up to play with css (no shit says rj LOL).
Also started using DW templates.. man they make site building so damn fast and now with css as well sites will be out the door in a flash.

domedia
02-10-2006, 02:41 PM
dw templates are perfect when you can't do data driven websites