Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hit counter with CSS

    I know this is a silly question, but im used to working with HTML not CSS ( trying to learn ). Im trying to add a hit counter to the bottom of the page, and everything ive tried isnt working.

    any help with this simple code would be helpful

    page code :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="description" content="Website short description." />
    <meta name="keywords" content="website main keywords" />
    <title>Captive Clothing</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    .style4 {
    font-size: 14px;
    color: #D1BD8B;
    }
    .style5 {color: #D1BD8B}
    a:link {
    color: #A40008;
    text-decoration: none;
    }
    a:visited {
    color: #A40008;
    text-decoration: none;
    }
    .style6 {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    }
    .style8 {
    font-size: 14px;
    color: #000000;
    }
    .style9 {
    color: #A40008;
    font-size: 16px;
    font-weight: bold;
    }
    .style10 {font-size: 14px}
    a:hover {
    text-decoration: none;
    }
    a:active {
    text-decoration: none;
    }
    -->
    </style>
    </head>

    <body>

    <div id="container">
    <div id="sub_header">
    <div align="left">
    <p>&nbsp;</p>
    <p><img src="images/main1.gif" alt="" width="775" height="90" /></p>
    </div>
    </div>
    <div id="main_content_top"><img src="images/main2.gif" alt="" width="241" height="487" /></div>

    <div id="main_content">

    <div class="content">
    <h2 align="center">Thank You For Visiting </h2>
    <p align="center" class="style6">We are a small clothing company out of Utica, NY. We only have a few designs available right now, but we're working on a bunch more. Soon enough we will have all kinds of clothing available. Hoodies, Long Sleeve, Tank Tops, Tees , Basically any type of clothing you can think of. If you have any special requests. Or designs you created and would like to see us print. Send us an email. All contact info can be found on the <a href="http://www.captive-clothing.com/contact.htm">Contact Us</a> page.</p>
    <p align="center" class="quote">&nbsp;</p>
    <h2 align="center">News &amp; Info </h2>
    <p><span class="style9">5/27/07</span><br />
    <span class="style8">Our new website was created and is 10X better than the last one. </span><br />
    <br />
    <span class="style9">5/19/07</span> <br />
    <span class="style10">Justin is working on a new website and should be complete in a few days</span></p>
    <p> <span class="style9">5/18/07 </span><br />
    <span class="style8">We currently only have one design in the store, but we will have two more designs coming within a few weeks. </span></p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p align="center">&nbsp;</p>
    </div>

    <div id="clear"></div>

    </div>

    <div id="main_content_bottom">
    </div>
    <div id="footer">
    <p>&nbsp;</p>
    <p align="center" class="style4"><a href="http://www.captive-clothing.com/index.html">Home</a> | <a href="http://www.captive-clothing.com/about.html">About</a> | <a href="http://captiveclothing.bigcartel.com">Store</a> | <a href="http://www.captive-clothing.com/friends.html">Friends</a> | <a href="http://www.captive-clothing.com/contact.html">Contact</a></p>
    <p><span class="style5"><strong>Copyright &copy; 2007</strong> | <a href="#">www.captive-clothing.com</a></span></p>
    <p><html>&nbsp;</p>
    <p>&nbsp;</p>
    </div>
    </html>

    </div>

    </body>

    </html>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,485
    Thanks
    6
    Thanked 981 Times in 954 Posts
    And whereís you hit counter code? I canít see it.

    You know, all the CSS thing only makes real sense if youíre using semantic code (which includes giving your classes and IDs descriptive names that represent their function on the page). It appears that you are using Dreamweaverís design mode. Although itís made for such things you should really use the code view and write your code by hand (Dreamweaver is helping you) because using the design view makes it just add useless and non-semantic code automatically.

    As to the counter code that is probably/usually a JavaScript which is inserted right before the closing </body> tag. This has nothing to do with CSS. Websites are still made of HTML, CSS is only used to style those pages, to give them a look.

    P.S.: When posting code please use the small '#' button in the reply window.

  • #3
    New Coder
    Join Date
    May 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes i am using dreamweaver layout, but what im wondering is if i was to get a HTML code for a hit counter, to get it to show with this page is just add the code before the last </body> tag?

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,485
    Thanks
    6
    Thanked 981 Times in 954 Posts
    Yeah, thatís exactly what I said. However, as I dinít know what kind of hit counter you are using I canít promise that this is the way to go. The website where you go that hit counter from might have installation instructions.
    What hit counter are you using? What does the code look like?

  • #5
    New Coder
    Join Date
    May 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just added the code between the last 3 </div> tags and its working perfectly.

    the hit counter is on the bottom of ( www.captive-clothing.com) if you wish to take a look. Thanks alot for the help.

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,485
    Thanks
    6
    Thanked 981 Times in 954 Posts
    OK, however, you have some errors in your code which you should fix. The most serious ones are:

    Code:
    <a href="http://www.easycounter.com/">
    <img src="http://www.easycounter.com/counter.php?captiveclothing"
    border="0" /></a>
    </body>
    </div>
    </div>
    
    
    </html>
    You didnít close your image and link, and the closing body tag is in the wrong pace. It should be right before the closing html tag.

    Read the installation instructions for your counter carefully.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •