I have tried this in 3 different browsers and it does not work.
Can anyone help? I tried it 2 different ways.
<STYLE TYPE-"type/css">
<!--
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
H2 {font-family: arial}
-->
</STYLE>
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
H1 {font-family: arial}
</STYLE>
Try using lower-case. If that doesn't work, can you show us the page?Can we see your comlete html page?
CSS should be put in, something like this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>A Page</title>
<style type="text/css">
<!--
a {color: #222;}
a:hover {color: #655ebb;}
h1 {font-family: arial, sans;}
//-->
</style>
</head>
<body>
<h1>A Page</h1>
<p>A paragraph with <a href=http://www.webdeveloper.com/forum/archive/index.php/"#">a link</a>.</p>
</body>
</html>the tree, I can't see your example.
look ot this link I put up a test file.
<!-- m --><a class="postlink" href="http://www.keithurbandesign.com/test.htmlArial">http://www.keithurbandesign.com/test.htmlArial</a><!-- m --> Font does not workArial font doesn't work, because you aren't using an H1 element. Get rid of your presentational markup, back to basics.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Content-Style-Type" content="text/css">
<title>Page Name</title>
<style type="text/css">
h1 {
font-family:arial, sans-serif;
}
a:link {color: #222;}
a:visited {color: #222;}
a:hover {color: #655ebb;}
a:active {color: #655ebb;}
</style>
</head>
<body>
<h1>Top Level Header</h1>
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"">This is a link to onwhere</a>.</p>
</body>
</html>Well you don't actualy have an h1 tag in there so it's not surprising that you don't see any airial.
Everything else seems dandy.
edit: sorry Bob, you must have started writing before me.my other sample does have H1 in it
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
H1 {font-family: arial}
</STYLE>
and the sample link i sent has H1
<!-- m --><a class="postlink" href="http://www.keithurbandesign.com/test.html">http://www.keithurbandesign.com/test.html</a><!-- m -->
still does not work.No, it doesn't. Are you even looking at your markup? You've used horrid, depreceated markup to resemble an H1 element, but you aren't using one.so H1 is a tag?
what if I just get rid of H1?is this correct?
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
font {font-family: arial}
</STYLE>No h1 here :<body bgcolor="#ffffff">
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"(EmptyReference!)"><font size="7">test HOVER</font></a></p>
<p></p>
<p><font size="6">jhbjhbjhbjhbjhbjhbkjhbkjhbjhbj</font></p>
</body>can you tell me what "A:" stand for in the css?
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
font {font-family: arial}
</STYLE>is this correct?
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
font {font-family: arial}
</STYLE>
No.
Try this :
<style type="text/css">
body {font-family: arial, serif;}
a:link {color: #222222;}
a:hover {color: #655ebb;}
</style>can you tell me what "A:" stand for in the css?
anchorso H1 is a tag?No, it's a rare breed of monkey that has two tail and a cross-tail that form an H, and there's only one of it which is why it is called H1. Of course it's a tag, why else would you use it in that context?
what if I just get rid of H1?In your CSS? Nothing, although it wont validate. You really dont have an h1 in your html.
can you tell me what "A:" stand for in the css?The a refers to all a elements, which like BonRouge said, stands for anchor. The semicolon is just some syntax that says a pseudo-class is coming up.
The original page that I posted will work fine.How does Anchor relate to what I'm doing?
I thought Anchors were links to other spots on a webpage...
I just want all my text to be in <!-- m --><a class="postlink" href="Arialhttp://www.w3schools.com/html/default.asp">Arialhttp://www.w3schools.com/html/default.asp</a><!-- m --> thanks for your help
I really appreciate it.Hi Keith, some people can be quite rude cant they...
Well just in case you havnt got it yet heres this.
I'll put my notes in the little quote boxes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>A Page</title>
<style type="text/css"> <!--
a {color: #222;} //Ok so the A tag stands for Anchor. And yes that is a hyperlink.. this line says that the links colour will be #222
a:hover {color: #655ebb;} //This says that when the cursor is 'hovering' over the hyperlink, it will change colour. You can make it change heaps of properties when the cursor mouseovers a hyperlink. Visit <!-- m --><a class="postlink" href="http://www.w3schools.com/css/css_reference.asp">http://www.w3schools.com/css/css_reference.asp</a><!-- m --> for help with any of the CSS coding
h1 {font-family: arial, sans-serif;} //--> //This one sets the heading 1 font to arial or a sans-serif font if arial is not available (I dont know why the other person had "arial, serif" there before cause arial is a sans-serif font...). this only applies to heading 1's in the body of the document, it won't apply to any other tags such as p or h2
</style>
</head>
<body>
<h1>A Page</h1> <!-- Ok in the body of the page if you want a heading to be in arial then you need to specify it with the <h1></h1> tags just like this one -->
<p>A paragraph with <a href=http://www.webdeveloper.com/forum/archive/index.php/"#">a link</a>.</p> <!--And this shows the hyperlink changes on hover-->
</body>
</html>
And you can apply these styles to heaps of html tags not only the h1 and a.
Well I hope that that was a little more usefull..
don't forget to utalise the <!-- w --><a class="postlink" href="http://www.w3schools.com">www.w3schools.com</a><!-- w --> site aswell, they have heaps of tutorials on lotsa stuff!!!Yes you right, I found a lot of people online to be rude.
Thank you for submitting your reply.
I did some testing with this CCS below and the links look great.
But the plain text on the html has mixed fonts.
I would like to have all text to show up in Arial font.
What can I do?
---------------------------------------
<title>My Page</title>
<style type="text/css"> <!--
a {color: #222;}
a:hover {color: #655ebb;}
h1 {font-family: arial, sans-serif;} //-->
</style>body{
font-family: arial, sans-serif;
}
or
*{
font-family: arial, sans-serif;
}
for everything to be that font face.Will this work?
<title>My Page</title>
<style type="text/css">
body {font-family: arial}
a:link {color: #222222;}
a:hover {color: #655ebb;}
</style>yes that should work as long as there arent any <font> tags in the body of the document. these override any set previously.Whoa. This discussion may be about to devolve quite considerably...
Keith, I think it may be time to do some reading. Check out my favorite reference at DevGuru.com (<!-- m --><a class="postlink" href="http://www.devguru.com/Technologies/css/quickref/css_index.html">http://www.devguru.com/Technologies/css ... index.html</a><!-- m -->) He gives examples and explanations for just about everything. Also, I would highly recommend the free w3schools.com site: <!-- m --><a class="postlink" href="http://www.w3schools.com/">http://www.w3schools.com/</a><!-- m -->
KuriusI dont mind helping - I just dont understand why some people even submit some of their answers. Sure they make sence to me, but obviously Keith is still new to CSS. Maybe this site can introduce a little icon that can be placed next to the articles that indicates the users experience. This way those who cant be bothered taking an extra 5 minutes to explain something properly can just pass over those threads. These forums are here so that the community can 'help' each other...The link to W3Schools (<!-- m --><a class="postlink" href="http://www.w3schools.com/">http://www.w3schools.com/</a><!-- m -->) is very useful for beginners.
Can anyone help? I tried it 2 different ways.
<STYLE TYPE-"type/css">
<!--
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
H2 {font-family: arial}
-->
</STYLE>
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
H1 {font-family: arial}
</STYLE>
Try using lower-case. If that doesn't work, can you show us the page?Can we see your comlete html page?
CSS should be put in, something like this:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>A Page</title>
<style type="text/css">
<!--
a {color: #222;}
a:hover {color: #655ebb;}
h1 {font-family: arial, sans;}
//-->
</style>
</head>
<body>
<h1>A Page</h1>
<p>A paragraph with <a href=http://www.webdeveloper.com/forum/archive/index.php/"#">a link</a>.</p>
</body>
</html>the tree, I can't see your example.
look ot this link I put up a test file.
<!-- m --><a class="postlink" href="http://www.keithurbandesign.com/test.htmlArial">http://www.keithurbandesign.com/test.htmlArial</a><!-- m --> Font does not workArial font doesn't work, because you aren't using an H1 element. Get rid of your presentational markup, back to basics.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Content-Style-Type" content="text/css">
<title>Page Name</title>
<style type="text/css">
h1 {
font-family:arial, sans-serif;
}
a:link {color: #222;}
a:visited {color: #222;}
a:hover {color: #655ebb;}
a:active {color: #655ebb;}
</style>
</head>
<body>
<h1>Top Level Header</h1>
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"">This is a link to onwhere</a>.</p>
</body>
</html>Well you don't actualy have an h1 tag in there so it's not surprising that you don't see any airial.
Everything else seems dandy.
edit: sorry Bob, you must have started writing before me.my other sample does have H1 in it
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
H1 {font-family: arial}
</STYLE>
and the sample link i sent has H1
<!-- m --><a class="postlink" href="http://www.keithurbandesign.com/test.html">http://www.keithurbandesign.com/test.html</a><!-- m -->
still does not work.No, it doesn't. Are you even looking at your markup? You've used horrid, depreceated markup to resemble an H1 element, but you aren't using one.so H1 is a tag?
what if I just get rid of H1?is this correct?
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
font {font-family: arial}
</STYLE>No h1 here :<body bgcolor="#ffffff">
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"(EmptyReference!)"><font size="7">test HOVER</font></a></p>
<p></p>
<p><font size="6">jhbjhbjhbjhbjhbjhbkjhbkjhbjhbj</font></p>
</body>can you tell me what "A:" stand for in the css?
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
font {font-family: arial}
</STYLE>is this correct?
<STYLE type=text/css>
A:link {COLOR: #222222}
A:hover {COLOR: #655EBB}
font {font-family: arial}
</STYLE>
No.
Try this :
<style type="text/css">
body {font-family: arial, serif;}
a:link {color: #222222;}
a:hover {color: #655ebb;}
</style>can you tell me what "A:" stand for in the css?
anchorso H1 is a tag?No, it's a rare breed of monkey that has two tail and a cross-tail that form an H, and there's only one of it which is why it is called H1. Of course it's a tag, why else would you use it in that context?
what if I just get rid of H1?In your CSS? Nothing, although it wont validate. You really dont have an h1 in your html.
can you tell me what "A:" stand for in the css?The a refers to all a elements, which like BonRouge said, stands for anchor. The semicolon is just some syntax that says a pseudo-class is coming up.
The original page that I posted will work fine.How does Anchor relate to what I'm doing?
I thought Anchors were links to other spots on a webpage...
I just want all my text to be in <!-- m --><a class="postlink" href="Arialhttp://www.w3schools.com/html/default.asp">Arialhttp://www.w3schools.com/html/default.asp</a><!-- m --> thanks for your help
I really appreciate it.Hi Keith, some people can be quite rude cant they...
Well just in case you havnt got it yet heres this.
I'll put my notes in the little quote boxes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>A Page</title>
<style type="text/css"> <!--
a {color: #222;} //Ok so the A tag stands for Anchor. And yes that is a hyperlink.. this line says that the links colour will be #222
a:hover {color: #655ebb;} //This says that when the cursor is 'hovering' over the hyperlink, it will change colour. You can make it change heaps of properties when the cursor mouseovers a hyperlink. Visit <!-- m --><a class="postlink" href="http://www.w3schools.com/css/css_reference.asp">http://www.w3schools.com/css/css_reference.asp</a><!-- m --> for help with any of the CSS coding
h1 {font-family: arial, sans-serif;} //--> //This one sets the heading 1 font to arial or a sans-serif font if arial is not available (I dont know why the other person had "arial, serif" there before cause arial is a sans-serif font...). this only applies to heading 1's in the body of the document, it won't apply to any other tags such as p or h2
</style>
</head>
<body>
<h1>A Page</h1> <!-- Ok in the body of the page if you want a heading to be in arial then you need to specify it with the <h1></h1> tags just like this one -->
<p>A paragraph with <a href=http://www.webdeveloper.com/forum/archive/index.php/"#">a link</a>.</p> <!--And this shows the hyperlink changes on hover-->
</body>
</html>
And you can apply these styles to heaps of html tags not only the h1 and a.
Well I hope that that was a little more usefull..
don't forget to utalise the <!-- w --><a class="postlink" href="http://www.w3schools.com">www.w3schools.com</a><!-- w --> site aswell, they have heaps of tutorials on lotsa stuff!!!Yes you right, I found a lot of people online to be rude.
Thank you for submitting your reply.
I did some testing with this CCS below and the links look great.
But the plain text on the html has mixed fonts.
I would like to have all text to show up in Arial font.
What can I do?
---------------------------------------
<title>My Page</title>
<style type="text/css"> <!--
a {color: #222;}
a:hover {color: #655ebb;}
h1 {font-family: arial, sans-serif;} //-->
</style>body{
font-family: arial, sans-serif;
}
or
*{
font-family: arial, sans-serif;
}
for everything to be that font face.Will this work?
<title>My Page</title>
<style type="text/css">
body {font-family: arial}
a:link {color: #222222;}
a:hover {color: #655ebb;}
</style>yes that should work as long as there arent any <font> tags in the body of the document. these override any set previously.Whoa. This discussion may be about to devolve quite considerably...
Keith, I think it may be time to do some reading. Check out my favorite reference at DevGuru.com (<!-- m --><a class="postlink" href="http://www.devguru.com/Technologies/css/quickref/css_index.html">http://www.devguru.com/Technologies/css ... index.html</a><!-- m -->) He gives examples and explanations for just about everything. Also, I would highly recommend the free w3schools.com site: <!-- m --><a class="postlink" href="http://www.w3schools.com/">http://www.w3schools.com/</a><!-- m -->
KuriusI dont mind helping - I just dont understand why some people even submit some of their answers. Sure they make sence to me, but obviously Keith is still new to CSS. Maybe this site can introduce a little icon that can be placed next to the articles that indicates the users experience. This way those who cant be bothered taking an extra 5 minutes to explain something properly can just pass over those threads. These forums are here so that the community can 'help' each other...The link to W3Schools (<!-- m --><a class="postlink" href="http://www.w3schools.com/">http://www.w3schools.com/</a><!-- m -->) is very useful for beginners.