Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Super Member
    Join Date
    Oct 2003
    Posts
    7,344
    Location
    Northeast, Ohio
    Tractor
    TC-40D SS New Holland

    Default 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!


  2. #2
    Silver Member
    Join Date
    Mar 2002
    Posts
    227
    Location
    Staunton, VA
    Tractor
    Kubota L2900

    Default 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

  3. #3
    Super Member
    Join Date
    Oct 2003
    Posts
    7,344
    Location
    Northeast, Ohio
    Tractor
    TC-40D SS New Holland

    Default 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.


  4. #4
    Super Member Inspector507's Avatar
    Join Date
    Mar 2002
    Posts
    5,799
    Location
    Central Ohio

    Default 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.


  5. #5
    Gold Member
    Join Date
    Jul 2005
    Posts
    273
    Location
    Portland Metro Area, Oregon
    Tractor
    JD 3320 & JD X300

    Default Re: Need HTML refresher in CSS

    Here is some samle code from my website:

    <html>
    <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">

    Please note that the stylesheet.css file is in the same directory as the file calling the css file.

    Here is s the CSS file. "stylesheet.css"

    body { font-family: Georgia, "Times New Roman", Times, serif;
    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;
    }

    I hope that will lead you in the right direction.

    Derek

  6. #6
    Super Member
    Join Date
    Oct 2003
    Posts
    7,344
    Location
    Northeast, Ohio
    Tractor
    TC-40D SS New Holland

    Default Re: Need HTML refresher in CSS

    Quote Originally Posted by Inspector507
    Mike,
    I took a look at your page and it appears there is a problem with the title or header, whatever it's called.
    After your comment I made a test page using Front Page click here
    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!


  7. #7
    Silver Member
    Join Date
    Mar 2002
    Posts
    227
    Location
    Staunton, VA
    Tractor
    Kubota L2900

    Default 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

  8. #8
    Elite Member Gatorboy's Avatar
    Join Date
    Aug 2001
    Posts
    3,099
    Location
    Bel Air, MD
    Tractor
    Kubota M8950, Bobcat 873 SSL & Kubota ZD-331

    Default Re: Need HTML refresher in CSS

    Quote Originally Posted by PineRidge
    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.
    I don't believe that's the case. That may just be one of hundreds of methods used.

  9. #9
    Super Member
    Join Date
    Oct 2003
    Posts
    7,344
    Location
    Northeast, Ohio
    Tractor
    TC-40D SS New Holland

    Default Re: Need HTML refresher in CSS

    Quote Originally Posted by Gatorboy
    I don't believe that's the case. That may just be one of hundreds of methods used.
    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!


  10. #10
    Platinum Member
    Join Date
    May 2006
    Posts
    726
    Location
    St.Marys County. Maryland/Tall Timbers Md.
    Tractor
    Farmtrac 300 dtc

    Default 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



Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
© 2014 TractorByNet.com. TractorByNet is a registered trademark of IMC Digital Universe, Inc. Other trademarks on this page are the property of their respective owners.