12 replies [Last post]
Jaylow
Jaylow's picture
Offline
Regular
poland
Last seen: 9 years 50 weeks ago
poland
Timezone: GMT+1
Joined: 2010-10-20
Posts: 26
Points: 31

Hi i am kind of new to html and css and was reading the Oreilly head first HTML with css xhtml

but now i have a problem
firefox and ie do not show any css all the html is good
i am only on chapter 1.23.1. Ready Bake CSS

the code is good i cheked it whit W3C CSS Validator.
i just does not show

i am using a apache2.2 server (http://localhost/)
the file is saved as index.html
firefox 3.6.10
IE (i dont know, probely old couse i never updated it)

mabye apache need to know it css just like i needed to type in an extra thingy in httpd.conf for php (also should i make an extra thingy for xhtml in the httpd.conf?)

if anyone could help it would be great!!

<html>
<head>
 
<title>starbuzz</title>
<style type=text/css”>
body {
background-color: #d2b48c;
margin-left: 20%;
margin-right: 20%;
border: 1px dotted gray;
padding: 10px 10px 10px 10px;
font-family: sans-serif;
}
 
</style>
 
</head
 
 
 
<body>

and the rest of the html stuff is under here
but not relevant

Vade
Vade's picture
Offline
Enthusiast
Ireland
Last seen: 12 years 17 weeks ago
Ireland
Joined: 2007-08-13
Posts: 315
Points: 276

The problem looks to be in

The problem looks to be in the quotation marks around text/css, they look off, I retyped them and it works fine.

Jaylow
Jaylow's picture
Offline
Regular
poland
Last seen: 9 years 50 weeks ago
poland
Timezone: GMT+1
Joined: 2010-10-20
Posts: 26
Points: 31

it works thanks a lot!!! it

it works thanks a lot!!! Love
it was making me crazy i stared 3 hours at it wondering what was wrong

thanks.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

Validating would have

Validating would have informed you of the problem.

Jaylow
Jaylow's picture
Offline
Regular
poland
Last seen: 9 years 50 weeks ago
poland
Timezone: GMT+1
Joined: 2010-10-20
Posts: 26
Points: 31

it was all green and stuff in

it was all green and stuff in the W3C css Validator
but i could have mist it couse it was my first time using the Validator

"Congratulations! No Error Found.
This document validates as CSS level 2.1 !

To show your readers that you've taken the care to create an interoperable Web page, you may display this icon on any page that validates. Here is the XHTML you could use to add this icon to your Web page: "

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

:shrug: I ran it through

:shrug: I ran it through using the curly quotes and it failed. Don't know.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 5 years 36 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Jaylow

Jaylow wrote:

Congratulations! No Error Found.
This document validates as CSS level 2.1 !

Should have validated the HTML

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

Deuce wrote: Jaylow

Deuce wrote:
Jaylow wrote:

Congratulations! No Error Found.
This document validates as CSS level 2.1 !

Should have validated the HTML

Lulz. I didn't even catch that. Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 8 years 11 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Next time be careful when

Next time be careful when you copy/paste code as this is how this issue arises, see it all the time when people 'grab' example code from sites that have not convert characters incorrectly.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Jaylow
Jaylow's picture
Offline
Regular
poland
Last seen: 9 years 50 weeks ago
poland
Timezone: GMT+1
Joined: 2010-10-20
Posts: 26
Points: 31

so this is html ?  <style

so this is html ?  <style type=text/css”>
and afther that comes css till i end it again whit the  </style> tag ending (that is html also then?)

@hugo i am reading a book (Oreilly head first HTML with css xhtml) and they told me to copy this. couse later on in the book they would do more aboute css but now it was just ready baked for me....

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

Jaylow wrote: so this is html

Jaylow wrote:

so this is html ?  <style type=text/css”>
and afther that comes css till i end it again whit the  </style> tag ending (that is html also then?) ...

Well, what's the file extension of the file containing that snippet?

Jaylow
Jaylow's picture
Offline
Regular
poland
Last seen: 9 years 50 weeks ago
poland
Timezone: GMT+1
Joined: 2010-10-20
Posts: 26
Points: 31

html. i am happy i am here i

html.
i am happy i am here i learn everday something
thanks

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2057
Points: 2289

Jaylow wrote:html.i am

Jaylow wrote:

html.
i am happy i am here i learn everday something
thanks

To be fair everything inside of the style tag is CSS but the style tag itself is HTML.

HTML goes through http://validator.w3.org
CSS goes through http://jigsaw.w3.org/css-validator/
or just put both through http://validator.w3.org/unicorn/ (I haven't actually used this one yet).