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 to the CF scene
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Space between divs in Dreamweaver


    Hello:
    I cannot get rid of the space between the different areas on my web page (divs) no matter what I do. Extensive googling has not returned any answers. Can someone enlighten me please? Thanks!
    jdj

  • #2
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    We need to see some source.
    Add this to the top of your style sheet:
    Code:
    * {margin: 0; padding: 0;}
    It is much better to learn how to code than to have dreamweaver code for you.
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, that fixed it! I knew it would be that easy. Thank you, seriously. Not sure what effect that asterisk will have on the project as I move forward(?), but it works for now. As for hand-coding, I know it is better to understand it from the inside-out, but I am a visual artist by profession and am simply trying to put a visually impressive site (admittedly not represented in the above pic) together asap and don't have time to learn an entire new highly technical skill. It may be a cheap shortcut, but Dreamweaver is a lifesaver (as long as I can coax it into doing what I want).

  • #4
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    * {} means it will effect all elements, img, p, div, table, td, etc;
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #5
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is there a way to zero in and only apply those values where and when I desire rather than a blanket command? Here's the source from before the alteration:

    @charset "utf-8";
    body {
    background: #1B1F27;
    margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
    padding: 0;
    text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
    color: #000000;
    font-size: 100%;
    font-family: "Century Gothic";
    }
    .text120percent {
    font-size: 120%
    }
    .oneColFixCtrHdr #container {
    width: 920px;
    margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
    border: 0px solid #000000;
    text-align: left; /* this overrides the text-align: center on the body element. */
    }
    .oneColFixCtrHdr #header {
    padding-top: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
    background-color: #FFFFFF;
    }
    .oneColFixCtrHdr #header h1 {
    margin: 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
    }
    .oneColFixCtrHdr #mainContent {
    padding: 0 10px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
    background: #FFFFFF;
    }
    .oneColFixCtrHdr #footer {
    background-color: #FFFFFF;
    padding-top: 0;
    padding-right: 0px;
    padding-bottom: 0;
    padding-left: 10px;
    }

    .oneColFixCtrHdr #footer p {
    padding-right: 0;
    padding-left: 0;
    padding-top: 0px;
    padding-bottom: 0px;
    }
    .style7 {color: #000000}

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,797
    Thanks
    6
    Thanked 1,023 Times in 996 Posts
    Quote Originally Posted by jdjones View Post
    I cannot get rid of the space between the different areas on my web page (divs) no matter what I do. Extensive googling has not returned any answers. Can someone enlighten me please? Thanks!
    jdj
    By the way: That space probably comes from collapsing margins.


  •  

    Posting Permissions

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