The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> external .css not showing up
DaneClark
post Jul 23 2009, 01:09 PM
Post #1





Group: Members
Posts: 8
Joined: 19-July 09
Member No.: 9,179



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
body {
color: purple;
background-color: #d8da3d }
</style>
<center>
I hope I'm doing this right
<link rel="stylesheet" href"main header.css" type "text/css" />
<title>
Module 5 assignment
</title>
<style type="text/css">
</style>
</head>
<body>
<font size="+2" face="Times"color="red">
<CENTER>
This is the toughest project we've done so far
</CENTER>
</font>
<font size="+3" face="Comic Sans MS"color="green">
<CENTER>
This is the toughest project we've done so far
</CENTER>
</font>
<LINK REL=StyleSheet HREF="body1.css" TYPE="text/css" MEDIA=screen>
<p class="right">
Some people are about to be run over. Frankie has about 5 seconds. Some people are very
tall and merciless. Quincy is destroying San Antonio. Some people wears glasses. Beth
looks like a dude. Some people are squirrel-handed. Gregor is a weird name. Some people
have braces. Some people have headgear. Fran could play linebacker for the Raiders. Some
people have rigged the enemy base with explosives. Albert has. Some people have a Southern
accent, and those are hot. Trisha is a severe hottie. Some people are being fangoriously
devoured by a gelatinous monster. Hillary's legs are being digested. Everyone is different.
No two people are not on fire.
</p>


The content of the .css is:

.one {border-top: thick dotted black;
border-right: thick solid blue;
border-bottom: thick groove red;
border-left; thick double #000; }


What am I doing wrong?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 23 2009, 02:30 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



This. smile.gif
<link rel="stylesheet" href"main header.css" type "text/css" />

The equal sign is missing + spaces in URLs must be URL encoded.
http://www.blooberry.com/indexdot/html/top...urlencoding.htm

There equal sign for 'type' is also missing. Also, the end slash is a XHTML thing and should absolutely not be used in HTML. Not a show stopper, but anyway.

CODE
<link rel="stylesheet" href="main%20header.css" type="text/css">


If it still doesn't work, please post the URL to the page.

Another thing, since you use CSS you are better off with a doctype that triggers Standards Mode. See http://hsivonen.iki.fi/doctype/ .
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DaneClark
post Jul 23 2009, 03:21 PM
Post #3





Group: Members
Posts: 8
Joined: 19-July 09
Member No.: 9,179



That still didn't work. By the way, the first .css link wasn't supposed to be there and was left over from something earlier, it's the second one I was talking about. Anyway, here's how it looks now:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
body {
color: purple;
background-color: #d8da3d }
</style>
<center>
I hope I'm doing this right
<title>
Module 5 assignment
</title>
<style type="text/css">
</style>
</head>
<body>
<font size="+2" face="Times"color="red">
<CENTER>
This is the toughest project we've done so far
</CENTER>
</font>
<font size="+3" face="Comic Sans MS"color="green">
<CENTER>
This is the toughest project we've done so far
</CENTER>
</font>
<link rel="stylesheet" href="body1.css" type="text/css">
<p class="right">
Some people are about to be run over. Frankie has about 5 seconds. Some people are very
tall and merciless. Quincy is destroying San Antonio. Some people wears glasses. Beth
looks like a dude. Some people are squirrel-handed. Gregor is a weird name. Some people
have braces. Some people have headgear. Fran could play linebacker for the Raiders. Some
people have rigged the enemy base with explosives. Albert has. Some people have a Southern
accent, and those are hot. Trisha is a severe hottie. Some people are being fangoriously
devoured by a gelatinous monster. Hillary's legs are being digested. Everyone is different.
No two people are not on fire.
</p>



User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 23 2009, 04:42 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



LINK belongs in HEAD, not in BODY.
http://htmlhelp.com/tools/validator/

As said...
QUOTE(pandy @ Jul 23 2009, 09:30 PM) *

If it still doesn't work, please post the URL to the page.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jul 24 2009, 02:44 AM
Post #5


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



See also http://htmlhelp.com/reference/css/style-html.html.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DaneClark
post Jul 25 2009, 07:35 AM
Post #6





Group: Members
Posts: 8
Joined: 19-July 09
Member No.: 9,179



QUOTE(pandy @ Jul 23 2009, 05:42 PM) *

LINK belongs in HEAD, not in BODY.
http://htmlhelp.com/tools/validator/

As said...
QUOTE(pandy @ Jul 23 2009, 09:30 PM) *

If it still doesn't work, please post the URL to the page.



Where in the head? I put it just before <center> and it still wouldn't work
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 25 2009, 11:24 AM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



CENTER shouldn't be in HEAD either, as the validator would have told you.

HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>

<title>Module 5 assignment</title>

<LINK REL=StyleSheet HREF="body1.css" TYPE="text/css" MEDIA=screen>

<style type="text/css">
body {
color: purple;
background-color: #d8da3d }
</style>

</head>


<body>
<center>
I hope I'm doing this right
</center>

<!-- And so forth.... -->

</body>
</html>



That's not likely to be the reason why your style sheet doesn't work though, so can you please link to the page? I didn't ask you to out of curiosity.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jul 25 2009, 01:22 PM
Post #8


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



See also Structure of an HTML 4 Document in our HTML reference.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DaneClark
post Jul 25 2009, 05:39 PM
Post #9





Group: Members
Posts: 8
Joined: 19-July 09
Member No.: 9,179



I can't link to it because I haven't published it yet. Anyway, here's now it looks now. Still don't see the CSS border that's supposed to be there.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Module 5 assignment</title>
<LINK REL=StyleSheet HREF="body1.css" TYPE="text/css" MEDIA=screen>
<style type="text/css">
body {
color: purple;
background-color: #d8da3d }
</style>
</head>
<body>
<center>
I hope I'm doing this right
</center>
<font size="+2" face="Times"color="red">
<CENTER>
This is the toughest project we've done so far
</CENTER>
</font>
<font size="+3" face="Comic Sans MS"color="green">
<CENTER>
This is the toughest project we've done so far
</CENTER>
</font>
<p class="right">
Some people are about to be run over. Frankie has about 5 seconds. Some people are very
tall and merciless. Quincy is destroying San Antonio. Some people wears glasses. Beth
looks like a dude. Some people are squirrel-handed. Gregor is a weird name. Some people
have braces. Some people have headgear. Fran could play linebacker for the Raiders. Some
people have rigged the enemy base with explosives. Albert has. Some people have a Southern
accent, and those are hot. Trisha is a severe hottie. Some people are being fangoriously
devoured by a gelatinous monster. Hillary's legs are being digested. Everyone is different.
No two people are not on fire.
</p>








User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 25 2009, 07:21 PM
Post #10


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



So let us at least see body1.css.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jul 26 2009, 12:37 AM
Post #11


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



The validator (see the links at the top and bottom of this page) will show the structural errors in your markup.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DaneClark
post Jul 26 2009, 07:35 AM
Post #12





Group: Members
Posts: 8
Joined: 19-July 09
Member No.: 9,179



Body1.css:

.one {border-top: thick dotted black;
border-right: thick solid blue;
border-bottom: thick groove red;
border-left; thick double #000; }
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 26 2009, 02:19 PM
Post #13


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



You dont have a class called "one" in the HTML.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DaneClark
post Jul 27 2009, 05:54 PM
Post #14





Group: Members
Posts: 8
Joined: 19-July 09
Member No.: 9,179



QUOTE(pandy @ Jul 26 2009, 03:19 PM) *

You dont have a class called "one" in the HTML.


I don't know anything about classes. How do I put one in?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 27 2009, 07:22 PM
Post #15


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Begin here. Read the first 3 sections.
http://htmlhelp.com/reference/css/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 04:32 AM