Results 1 to 10 of 16
-
08-17-2006, 10:02 AM #1Super Member
- Join Date
- Oct 2003
- Posts
- 7,344
- Location
- Northeast, Ohio
- Tractor
- TC-40D SS New Holland
Need HTML refresher in CSS
Need to enlist all you HTML Grus
I'm re-designing our home page to get better rankings within the various search engines.
I am aware that the majority of search engines give a boost in relevancy to words placed within the <H1> tags. They associate the <H1> tag to specify page or topic headings.
Problem is that the words are just to large to suit my taste.
So, would like to use a cascading style sheet (CSS) to specify to the browser to display whatever font size I need for the <H1> tag. Make sense?
So I inserted the following code on our home page:
<link href="http://www.pineridge7.com/firststyle.css" rel="stylesheet" type="text/css">
Then I made a new page called firststyle.css and loaded it in our web (root directory) with the following code:
h1 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #000099;}
I assumed (there's that word again folks) that it would make the <H1> heading and display it as a 14 point font size, but there is no change that I can see in IE. Why?
If you would like to view the source code please go here:
www.pineridge7.com
As always, thanks for your input guys!
-
08-17-2006, 11:28 AM #2Silver Member
- Join Date
- Mar 2002
- Posts
- 227
- Location
- Staunton, VA
- Tractor
- Kubota L2900
Re: Need HTML refresher in CSS
Mike,
I ran your code through an online css validator at http://validator.w3.org/ and it passed.
I then looked at your page referenced above and did a "view source". The first line it showed was the <body> tag. There was no <head> section, which is where the link to the css file needs to be. Did I miss something?-Frank
-
08-17-2006, 12:37 PM #3Super Member
- Join Date
- Oct 2003
- Posts
- 7,344
- Location
- Northeast, Ohio
- Tractor
- TC-40D SS New Holland
Re: Need HTML refresher in CSS
Frank don't think that's it. I changed the tag but it's still not working. Funny in in Front Page view it appears to have reduced the print, but when published it still looks full size.
-
08-17-2006, 12:45 PM #4
Re: Need HTML refresher in CSS
Mike,
I took a look at your page and it appears there is a problem with the title or header, whatever it's called.
-
08-17-2006, 12:51 PM #5Gold Member
- Join Date
- Jul 2005
- Posts
- 273
- Location
- Portland Metro Area, Oregon
- Tractor
- JD 3320 & JD X300
Re: Need HTML refresher in CSS
Here is some samle code from my website:
<html>Please note that the stylesheet.css file is in the same directory as the file calling the css file.
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<link rel="stylesheet" type="text/css" href="stylesheet-print.css" media="print" />
<link rel="Shortcut Icon" type="image/ico" href="images/icons/favicon.ico">
<head>
<title>All in the Picture - Weddings</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Here is s the CSS file. "stylesheet.css"
body { font-family: Georgia, "Times New Roman", Times, serif;I hope that will lead you in the right direction.
font-size: 12px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
color: #333;
}
p {
font-size: 16px;
font-family: Georgia, "Times New Roman", Times, serif;
}
h3, h4 {
color: 000080;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 18px;
font-style: normal;
}
h1 {
color: #000080;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 30px;
font-weight: bold;
text-transform: uppercase;
}
h2 {color: #000080;}
h6 {font-family: Georgia, "Times New Roman", Times, serif;
font-size: 16px;
color: 000080;
}
a {color: #000080;
text-decoration: none;
font-weight: bold;
}
a:hover {color: #000080;
text-decoration: underline;
font-weight: bold;
}
li, td { font-family: Georgia, "Times New Roman", Times, serif;
font-size: 16px;
color: #333;
}
.sectiontitle {
font-family: Arial, Helvetica, sans-serif;
color:#333;
font-size:small;
font-weight:normal;
padding:9px;
margin-bottom:8px;
background:#eee;
text-transform:none;
}
.blogbody { font-family: helvetica, arial, sans-serif;
font-size: 10px;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
color: #333;
}
.advertisement {
background-color: #FF0000;
padding: 9px;
font-family: Arial;
font-weight: normal;
color: #FFFFFF;
}
.advertisement2 {
background-color: #FFFFCC;
padding: 9px;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: bold;
color: #333333;
font-variant: small-caps;
font-style: italic;
font-size: 24px;
text-align: center;
}
.referral {
padding: 7px;
}
h5 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 10px;
font-style: normal;
color: #000080;
}
hr {
height:2px;
background-color: #000080;
width: 700px;
background-position: center;
}
.pdf {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-style: normal;
font-weight: bold;
color: #FFFFFF;
background-color: #CCCCCC;
text-decoration: none;
padding-top: 8px;
padding-right: 8px;
padding-bottom: 8px;
padding-left: 8px;
}
Derek
-
08-17-2006, 02:10 PM #6Super Member
- Join Date
- Oct 2003
- Posts
- 7,344
- Location
- Northeast, Ohio
- Tractor
- TC-40D SS New Holland
Re: Need HTML refresher in CSS
After your comment I made a test page using Front Page click here
Originally Posted by Inspector507
After uploading it everything worked. So I started comparing the tags between the two pages. You guys were right I had the tags messed up a bit. I also had the:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
stripped out of the page.
All appears to be working correctly now, thanks for your help guys!
-
08-17-2006, 02:17 PM #7Silver Member
- Join Date
- Mar 2002
- Posts
- 227
- Location
- Staunton, VA
- Tractor
- Kubota L2900
Re: Need HTML refresher in CSS
CSS is a great tool. I use it for all of my client's sites now (I do web design and programming on the side). When they get a wild hair and want to change how the site looks, I simply change a couple of lines of code and viola! Everything looks different. Saves tons of time.
-Frank
-
08-17-2006, 04:06 PM #8Elite Member
- Join Date
- Aug 2001
- Posts
- 3,098
- Location
- Bel Air, MD
- Tractor
- Kubota M8950 & Bobcat 873 SSL
Re: Need HTML refresher in CSS
I don't believe that's the case. That may just be one of hundreds of methods used.
Originally Posted by PineRidge
-
08-17-2006, 04:53 PM #9Super Member
- Join Date
- Oct 2003
- Posts
- 7,344
- Location
- Northeast, Ohio
- Tractor
- TC-40D SS New Holland
Re: Need HTML refresher in CSS
Gaterboy it may or may not be the case, I'm really not the expert on this subject by any means. But when I read something in print I normally don't have a reason to challenge it. Good thing for all my past teachers!
Originally Posted by Gatorboy
-
08-17-2006, 06:39 PM #10Platinum Member
- Join Date
- May 2006
- Posts
- 726
- Location
- St.Marys County. Maryland/Tall Timbers Md.
- Tractor
- Farmtrac 300 dtc
Re: Need HTML refresher in CSS
Pineridge,I like your site real well.Try to get more backlinks to your site, spiders love em.Signed up for the newsletter too.
http://www.google.com/search?sourcei...idge7%2Ecom%2F



Reply With Quote
