Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Help with CSS

  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    29
    Member #
    7569
    Hey, my entire site ( www.excelwebs.net ) has one CSS Template.
    This is my css
    <style type="text/css">
    <!--
    body {
    background-image: url(images/bg.gif);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin-left:40px;
    margin-right:40px;
    }
    a:link {
    color: #1925AD;
    }
    a:hover {
    color: #0099FF;
    }
    .style1 {font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin-left:40px;
    margin-right:40px;
    }
    .style3 {font-size: 14px}
    .style5 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }

    }
    -->
    </style>
    It works on every page except one: www.excelwebs.net/whyyouneedasite.html
    I have no idea why my left / right margins dont work like they work on every other page. If anyone can help me it would be greatly appriciated.
    Thanks

  2.  

  3. #2
    Junior Member
    Join Date
    Sep 2004
    Posts
    29
    Member #
    7569
    Oh yea, this also shows up correctly in Dreamweaver.
    Thanks

  4. #3
    Member
    Join Date
    Aug 2004
    Location
    Ohio
    Posts
    47
    Member #
    7210
    Really wish people would quit using Dreamweaver. Every post here that mentions a problem and Dreamweaver has markup so horrible that.... Okay, it's slightly better than Frontpage and MSWord. Ugh, though.

    Take your whole content section for example. It's full of unnecessary class definitions, break tags, depricated center tags, and just general bad nesting. Your code COULD look as simple as


    HTML Code:
    ...</td>
    <td colspan="12" class="style1">
    <h1>Why Every Small Business Needs a Website</h1>
    <h2>Your Competitor Has one</h2>
    <p>To stay on top of an ever-changing market, most small business owners try to keep tabs on their competitors. By doing so, they gain insight on market trends, come up with new strategies and stay up to date with what others offer. If your competitors have a website, it's a strong indication you should too.</p>
    <h2>Stay Open 24/7/365!
    <p>While some small businesses are open 24 hours a day, most business hours are limited to a more traditional workday schedule. With a website, customers can view your products and services long after your normal operating hours. If you sell products online, you can even accept orders from a different part of the world while you sleep!</p>
    ...</td>
    Instead, you've got (well, dreamweaver's got) this mess:

    HTML Code:
    ...</td>
    <td colspan="12" background="images/excelwebstemplateextende-20.gif" class="style1">
    <div align="center">
    <div align="left">
    <div align="center">
    <p align="center" class="style1">
    <B class="style5" style="FONT-SIZE: 24px">Why Every Small Business Needs a Website</B>
    <BR>
    <BR>
    </p>
    <p align="left" class="style1">
    <center>
    <span class="style5">
    <b>Your Competitor Has One</b>
    </span>
    </center>
    <BR>
    To stay on top of an ever-changing market, most small business owners try to keep tabs on their competitors. By doing so, they gain insight on market trends, come up with new strategies and stay up to date with what others offer. If your competitors have a website, it's a strong indication you should too. 
    <BR>
    <BR>
    <B class="style5">
    <center>Stay Open 24/7/365!</center>
    </B>
    <BR>
    While some small businesses are open 24 hours a day, most business hours are limited to a more traditional workday schedule. With a website, customers can view your products and services long after your normal operating hours. If you sell products online, you can even accept orders from a different part of the world while you sleep! 
    <BR>
    <BR>
    ...</td>
    You've got a center-aligned div inside a left-aligned div inside a center-aligned div for no apparent reason right off the bat.

    You've got alignment directions for elements that also have a class. Would be cleaner to put the alignment inside the class. Everything in the parent td is center aligned, and in my tests both div, heading (h1, h2, etc.), and p tags inherit that alignment from their parent element, so you shouldn't need to use center tags or apply alignment to anything other than the parent td.

    Later on you put a span with style5 around a br tag. Yes, a br tag.

    If you want the quick fix, you can remove the nested center tag from the p tags that have style1 applied to them. Not sure why, but that's what's negating your style. Adding style1 to the td did nothing of course since margin space is added to the outside of an element, whereas padding is added to the inside.

  5. #4
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Usurper,

    You should realize that it is not Dreamweaver that is the problem - it is how people use Dreamweaver. If somebody already knows HTML very well, then they can use Dreamweaver and create very nice, clean code. If that is not possible for you, then you really just need to learn how to use it.

    Heather
    choosy developers choose gif!
    website | paintings | blog

  6. #5
    Junior Member
    Join Date
    Sep 2004
    Posts
    29
    Member #
    7569
    Thanks for your help, didnt realize the extra tags in there. Got it working.

  7. #6
    Member
    Join Date
    Aug 2004
    Location
    Ohio
    Posts
    47
    Member #
    7210
    Quote Originally Posted by raspberryh
    Usurper,

    You should realize that it is not Dreamweaver that is the problem - it is how people use Dreamweaver. If somebody already knows HTML very well, then they can use Dreamweaver and create very nice, clean code. If that is not possible for you, then you really just need to learn how to use it.

    Heather
    The problem is that DW is primarily for people who don't want to bother with code, clean or otherwise. If you know how to code clean html, you probably don't need DW.

  8. #7
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    No, not true. Most professional web designers know how to code clean html - but using Dreamweaver saves a TON of time. So, the reason why most people who already know how to code clean HTML use Dreamweaver is because it is so much faster. Why do you think Dreamweaver is the industry standard?
    choosy developers choose gif!
    website | paintings | blog

  9. #8
    Junior Member
    Join Date
    Sep 2004
    Posts
    29
    Member #
    7569
    go DW!

  10. #9
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Quote Originally Posted by raspberryh
    No, not true. Most professional web designers know how to code clean html - but using Dreamweaver saves a TON of time.
    that's exactly why i use dw... i'm always in code view (not design which is what causes most of people's problems). the extensions really saves time plus i can change my pages directly on the server.
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  11. #10
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    Awesome!
    choosy developers choose gif!
    website | paintings | blog


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:10 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com