开发者

What's wrong with this CSS?

I tested the code in three browsers and it worked perfectly well

However, when I viewed it from another computer with slightly lower quality graphics the only thing that worked was the normal text colours and nothing else...

What's wrong with the code?

body {          
    background: #CCCCCC;            
}

td {            
    font-family: Arial;         
}

table.borde开发者_运维技巧r {          
    background: #0000FF;            
}

.thead {            
    background: #0000FF;
    color: #FFFFFF;         
}

.thead a {          
    color: #00FFFF;             
}

.thead a:hover {            
    color: #FF0000;             
}

.tbody {            
    background: #FFFFFF;
    color: #000000;         
}

a {         
    color: #0000FF;         
}

a:hover {           
    color: #FF0000;         
}

input,textarea {            
    background: #FFFFFF;
    border: solid 1px #0000FF;
    color: #0000FF;         
}

input.button {          
    background: #FFFFFF;
    border: solid 1px #0000FF;
    color: #0000FF;         
}


My guess would be that the browser is reading the CSS property and expecting the other values. You should try replacing

background

with

background-color


border should be in the order 1px solid #0000FF.

I would write background-color, but background should also work.


Is the browser version number on this computer different than other computers you tested on? And, what do you mean by "lower quality graphics"? The browser has different graphics settings (which could certainly cause this), or the monitor/videoCard is old?


they possibly fall out side of the "web safe" colours. see here:

http://en.wikipedia.org/wiki/Web_colors


Are you sure it's an issue with this CSS, and not an issue with how you link to the style sheet or with the style sheet?

I know that some browsers (Firefox etc) are a little more forgiving when it comes to issues like this...


you can use border: solid 1px #0000FF;. it's correct too, maybe the file its not included in your HTML file, upload the full files, so we can help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜