Question:
Can anyone help me with my HTML/ CSS question?
Harrison Howard
2012-02-28 20:05:07 UTC
Ok, so I have recently been making a little HTML and CSS site on my mac, just for fun, but I would have continued to do so, but my html and css is messing up with my style sheet.
__________________________________________
Here is the html:



Harrison ENT








Hello and welcome to Harrison Enterprises!




________________________________
CSS:
/* Main Style Sheet For Harrison Enterprises index.html */

body.one {
color: red;
font-family: Arial;
font-weight: bold;
}

Thanks if you can figure out my problem!
Please leave as much info about the problem in the comment. :)
-Harrison
Three answers:
anonymous
2012-02-28 20:28:29 UTC
Don't need a CSS selector name such as "body.one". Sufficient to just set CSS rules with "body". NO character encoding meta tag. Suggest you use hex color codes.



Validate...



Validating:



Why Validate?: http://validator.w3.org/docs/why.html

CSS Validator: http://jigsaw.w3.org/css-validator/

HTML Validator: http://validator.w3.org/#validate_by_uri+with_options



Ron
anonymous
2012-02-28 20:16:09 UTC
How is it messing up your with your style sheet? It displays properly for me. Just make sure that your css file called stylemain does not have an file extension.



That is what says look for a file called stylemain not stylemain.css or stylemain.txt, just plain old stylemain with no extension.
JerryOfBorg
2012-02-28 20:38:44 UTC
OK So you are using a MAC. Can I assume you are using Safari? Then you will want to look into HTML 5. You will use a much simpler doctype and CSS will be easier and more powerful.



look at this link.



http://www.w3schools.com/html5/tag_doctype.asp


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...