Jump to content

Only certain atributes from .css file are transfered


kiedis

Recommended Posts

Hi. I have a small .html file which is linked to .css file. However, not all atributes in .css file are "transfered" to the content in .html file - only a background image and text color are tranfered, whereas font-style, font-size and font-weight are not. Here's the content of .css file (with atributes which are not transfered marked in bold): h1.test{font-style:cursive;color:white;font-size:40px;font-weight:1800;}p.test_p{font-style:cursive;color:white;font-size:40px;font-weight:200;}body{background-image:url('flower.jpg');} And the code in html file looks like this: <!DOCTYPE html><html><head><title>TEST</title><link rel="stylesheet" type="text/css" href="style.css"></head><body><h1 class="test">Welcome</h1><p class="test_p">Hei</p></body></html> How it happens that only certain atributes from .css file are tranfered? Firefox 17.0.1, Windows7 home premium.

Link to comment
Share on other sites

Cursive isn't a proper value for font-style: http://www.w3schools.com/cssref/pr_font_font-style.asp1800 isn't a valid value for font-weight. Only values from 100 to 900 are allowed.Most browsers don't support varying values of font.weight, so 200 is equal to normal font-weight.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...