HTML & CSS

HTML is ignoring CSS

Page 1 of 1

11 Replies - 1324 Views - Last Post: 02 August 2009 - 03:47 PM

#1 sherna1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 28-July 09

HTML & CSS

Post icon  Posted 28 July 2009 - 11:58 PM

No matter what I add to the CSS, the HTML pages ignore it's existence.

Using Notepad++ to design a web page
Mozilla Firefox to view files

This is at the beginning of the HTML file with the <link> to CSS:-
<head>
<title>index.html</title>
<meta name="verify-v1" content="5WayCt+lTNwaXpCYrbTZfB1CMFi12ud6rn+O0ysMPmA=" >
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" href="stylesheet.css" type="text/css">
</head>



The CSS is saved as stylesheet.css and is kept in the same folder as the index.html and other pages.

Some of the CSS entries:-
body {
	min-height: 101%;
	margin: 0px;
	padding: 4px;
	font-family: arial, bitstream vera serif, helvetica, tahoma, verdana, serif, sans serif;
	font-size: 10px;
}
h1{ font-family: comic sans ms, helvetica, tahoma, verdana, arial,serif;
		font-style:normal;
		font-weight:normal;
		font-size:30pt;
		text-align: center }
address { margin-top: 1em; padding-top: 1em; border-top: thin dotted }



what have I missed?
Thank you.

** Edit ** :code:

Is This A Good Question/Topic? 0
  • +

Replies To: HTML & CSS

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,383
  • Joined: 10-May 07

Re: HTML & CSS

Posted 29 July 2009 - 12:30 AM

There are no body or h1 tags in your html code.
Was This Post Helpful? 0
  • +
  • -

#3 sherna1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 28-July 09

Re: HTML & CSS

Posted 29 July 2009 - 01:04 AM

View Postno2pencil, on 28 Jul, 2009 - 11:30 PM, said:

There are no body or h1 tags in your html code.


There are body and h1 tags on the HTML, I just haven't shown the whole page. I want to know what is wrong with the <link> - why doesn't the HTML page recognize the CSS?
Was This Post Helpful? 0
  • +
  • -

#4 neit  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 187
  • Joined: 13-February 09

Re: HTML & CSS

Posted 29 July 2009 - 01:05 AM

you would be better post all the code
Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,383
  • Joined: 10-May 07

Re: HTML & CSS

Posted 29 July 2009 - 01:21 AM

Can you provide us with a live website, so we can verify that the html page can reach stylesheet.css based on the path you've used in the link tag?

If that's not the situation, then we'll need to see the code in use.
Was This Post Helpful? 0
  • +
  • -

#6 tommyflint  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 34
  • View blog
  • Posts: 679
  • Joined: 24-July 08

Re: HTML & CSS

Posted 29 July 2009 - 01:32 AM

Well first thing you haven't closed any of your meta tags or your style sheet link tag
<link rel="stylesheet" href="stylesheet.css" type="text/css" />



tommyflint

This post has been edited by tommyflint: 29 July 2009 - 01:32 AM

Was This Post Helpful? 0
  • +
  • -

#7 sherna1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 28-July 09

Re: HTML & CSS

Posted 29 July 2009 - 04:19 AM

View Postno2pencil, on 29 Jul, 2009 - 12:21 AM, said:

Can you provide us with a live website, so we can verify that the html page can reach stylesheet.css based on the path you've used in the link tag?

If that's not the situation, then we'll need to see the code in use.


This is the web page:-

http://www.suzanne.net.au/

View Posttommyflint, on 29 Jul, 2009 - 12:32 AM, said:

Well first thing you haven't closed any of your meta tags or your style sheet link tag
<link rel="stylesheet" href="stylesheet.css" type="text/css" />



tommyflint


thanks tommy. I'm a very raw beginner and I appreciate your help.
Was This Post Helpful? 0
  • +
  • -

#8 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,605
  • Joined: 20-January 09

Re: HTML & CSS

Posted 29 July 2009 - 08:58 AM

So did you get it resolved, I am assuming that you have based on :

Quote

thanks tommy.


Let us know - thanks.

--

Greg
Was This Post Helpful? 0
  • +
  • -

#9 sherna1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 28-July 09

Re: HTML & CSS

Posted 29 July 2009 - 04:36 PM

View Postgregwhitworth, on 29 Jul, 2009 - 07:58 AM, said:

So did you get it resolved, I am assuming that you have based on :

Quote

thanks tommy.


Let us know - thanks.

--

Greg


Thank you Greg. If I use Tables in HTML, the CSS coding won't apply itself.
I'll go back and work thru another tutorial.
Thanks again for your help.
Was This Post Helpful? 0
  • +
  • -

#10 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,605
  • Joined: 20-January 09

Re: HTML & CSS

Posted 31 July 2009 - 03:40 PM

Make sure to post any questions on here too as they should be applying themselves to your table as well. Tables don't get special treatment from CSS but they do have some quirks - so let me know if you need more help.

--

Greg
Was This Post Helpful? 0
  • +
  • -

#11 AUAN  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 30-July 09

Re: HTML & CSS

Posted 02 August 2009 - 02:28 AM

View Postsherna1, on 29 Jul, 2009 - 03:36 PM, said:

View Postgregwhitworth, on 29 Jul, 2009 - 07:58 AM, said:

So did you get it resolved, I am assuming that you have based on :

Quote

thanks tommy.


Let us know - thanks.

--

Greg


Thank you Greg. If I use Tables in HTML, the CSS coding won't apply itself.
I'll go back and work thru another tutorial.
Thanks again for your help.



The CSS will apply itself, as you should just need to add tags like "class" and "id" within them.
Was This Post Helpful? 0
  • +
  • -

#12 gregwhitworth  Icon User is offline

  • Tired.
  • member icon

Reputation: 219
  • View blog
  • Posts: 1,605
  • Joined: 20-January 09

Re: HTML & CSS

Posted 02 August 2009 - 03:47 PM

Quote

The CSS will apply itself, as you should just need to add tags like "class" and "id" within them.


True, but you can also call the table tags themselves:

table tr  td {
	 border-right: 1px solid blue;}



Just as an example. You may already know this AUAN but I didn't want anyone else to think they had to apply a class to every td for it to work correctly.

--

Greg
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1