# css only working in google chrome



## anoesis23 (Mar 2, 2012)

Hi, I've just been testing a css stylesheet, and it seems that it only renders my page in google chrome.

Here is the css:

body {
background-image: url('bg.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
}
/*DIV STYLES BEGIN*/
/*CONTAINER*/
#container {
width: 800px;
margin-right: auto;
margin-left: auto;
padding-right: 20px;
padding-left: 20px;
background-color: #5F755E;
border-top: solid 2px #FFB90F;
}
/*END CONTAINER*/
/*HEAD*/
#head {
width: 800px;
margin-right: auto;
margin-left: auto;
padding-right: 20px;
padding-left: 20px;
background-color: none;
text-align: right;
font-family: "Poor Richard", Palatino Linotype, serif;
font-size: 50pt;
color: #FFB90F; 
}
/*END HEAD*/

/*MENU*/
#menu {
border-right: solid 2px #FFB90F;
border-bottom: solid 2px #FFB90F;
width: 150px;
float: left;
}
#menu ul {
padding: 0px;
margin: 0px;
list-style-type: none;
}
#menu li {
padding: 0px;
margin: 0px;
}
#menu a:link, #menu, a:visited {
text-align: center;
font-family: "Corbel", Arial, sans serif;
font-size: 16pt;
font-weight: normal;
color: #FFB90F;
text-decoration: none;
}
#menu a:hover, #menu, a:active {
text-align: center;
font-family: "Corbel", Arial, sans serif;
font-size: 16pt;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
}
/*END MENU*/
/*MAIN*/
#main {
padding-left: 15px;
border-left: solid 2px #FFB90F;
border-bottom: solid 2px #FFB90F;
margin-left: 150px;
}
#main h1 {
color: #FFFFFF;
font-size: 20pt;
font-family: "Corbel", Arial, sans serif;
}
#main p {
color: #FFFFFF;
font-size: 13pt;
text-align: justify;
font-family: "Corbel", Arial, sans serif; 
}
#main table {
color: #FFFFFF;
font-size: 13pt;
text-align: justify;
font-family: "Corbel", Arial, sans serif; 
}
#main a:link, #main a:visited, #main a:active {
color: #FFB90F;
font-size: 13pt;
text-decoration: none;
}
#main a:hover {
color: #FFFFFF;
font-size: 13pt;
}
/*END MAIN*/​Here is the webpage:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Waipahihi



Waipahihi















*
Welcome to Waipahihi
*

Fusce eu libero in tellus venenatis sodales. Vestibulum ornare turpis posuere sem lobortis commodo. Fusce ut erat et velit malesuada fringilla. Praesent accumsan velit bibendum nibh facilisis congue. Aliquam mollis mauris et nulla auctor dignissim. Mauris feugiat sollicitudin auctor. Duis laoreet commodo fringilla. Ut at rhoncus eros. Vestibulum metus nibh, porta at viverra at, sagittis vel lorem. Morbi tempus purus sed dui convallis egestas.






​Everything works fine in chrome, but in ie and firefox the web page is not rendered with css at all.

I'm totally confused by this one... any help please?

Thanks in advance


----------



## dukevyner (Nov 4, 2011)

First off welcome to the forums... here you will find plenty of people with experience and willingness to help... now to the problem at first i told my self "how could this be?" but it is truly fascinating... i' will keep looking at the code but i've never heard of this


----------



## dukevyner (Nov 4, 2011)

*EDIT:* I Have found the solution... I hope it's as simple as it seems... in line 6... you had it should be where what i changed is in green... Hope this helps. Reply with results 

*<moderator edit>* removed colour tags as they made it unreadable


----------



## anoesis23 (Mar 2, 2012)

hey, thanks for that ... not sure why that is though. When would you use the type="screen" thing? Because I am veiwing it on a screen, right?


----------



## dukevyner (Nov 4, 2011)

type refers to what the file is to be read as(thus the stylesheet/text)... ive never used screen... anyway glad to see that the issue was resolved, make the thread as solved


----------



## anoesis23 (Mar 2, 2012)

ok thanks


----------



## dukevyner (Nov 4, 2011)

be sure to hit the "mark solved" button at the top of the page


----------



## caraewilton (Nov 7, 2007)

type should always be "text/css"

if you want to specify where the style sheet is used, then you use media as follows

That said, there is no need to specify screen as this is the default.


----------

