Gap between divs?!?!

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Gap between divs?!?!

    Hi there.

    I have just started learning about CSS and I have started to make a site, but
    I have a problem with a gap in between my banner and content div.

    The code I have used is below:

    CSS File
    body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin: 0px;
    }#wrapper {
    background-color: #CCCCCC;
    width: 760px;
    }
    #top {
    background-color: #333333;
    height: 100px;
    }
    #content {
    background-color: #FF0000;
    margin: 0px;
    padding: 0px;
    }

    and for the index page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <!-- TemplateBeginEditable name="doctitle" -->
    <title></title>
    <!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!--
    TemplateEndEditable -->
    <link href="../includes/twcss.css" rel="stylesheet" type="text/css" />
    </head>

    <body>
    <div id="wrapper">
    <div id="top"></div>
    <div id="content"><p>test</p></div>
    </div>
    </body>
    </html>

    If you go to [url]http://www.total-wrestling.co.uk/new/main/index.php[/url], you can see
    how it is displayed.

    Any help on this would be great.

    Thanks,

    Craig

    craigshaw Guest

  2. Similar Questions and Discussions

    1. css divs
      i've got two scrolling divs on my site and i want to be able to edit both divs in contribute, but when i hit "edit page," i can only edit one of the...
    2. DIVs and UL
      Hi all. I was curious if anyone has had any luck in having Contribute add a DIV by the user that the user can then style to have a certain look/feel...
    3. flashpaper and divs
      I'm having a really hard time trying to use Javascript to resize, set style.display to 'none', etc. I found a livedoc that mentioned that this may...
    4. CSS & Divs
      My page contains 2 Div's - one inside the other. (Menu Div is contained inside wrapper div) #wrapper { width: 770px; margin: 0px auto; border:...
    5. collapsing divs
      Is there any way to stop a div tag collapsing under certain circumstances? It seems as if an outer div will happily expand itself an inner one, but...
  3. #2

    Default Re: Gap between divs?!?!

    Anyone got any idea what is wrong as I could do with knowing what to do to solve it?

    Any help much appreciated.

    Thanks in advance,

    Craig
    craigshaw Guest

  4. #3

    Default Re: Gap between divs?!?!

    craigshaw wrote:
    > I have just started learning about CSS and I have started to make a site
    Things like this will often happen. But anyway, I'm not sure which gap you
    speak of, what browser are you viewing the page in?

    Mihgt want to change this: <div id="top"></div> to this <div
    id="top">&nbsp;</div> and see if that helps.

    mzanime.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139