#1
  1. PHP Newbie forever
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    France
    Posts
    58
    Rep Power
    13

    HTML CSS Div problem


    I have recently just started to use web standards praticually xhtml 1.0

    The problem I am having is that the box I am going to us to hold news updates seems to have a gap.




    I cannot get rid of the gap and its really annoying me.

    The HTML code is:
    <div class="newsbody2" align='left'>
    <img src='Images/newsbanner.gif' width="344" height="12" border="0" alt="NewsBar top" />
    <div class="newsbody">&nbsp;</div>
    <img src="Images/newsbannerbot.gif" width="344" height="12" border="0" alt="NewsBar bottom" /></div>
    The CSS is:
    div.newsbody {border: #000000; border-style: dashed; border-top-width: 1px; border-right-width: 1px;
    border-bottom-width: 0px; border-left-width: 1px; width: 342px; height: 200px;}

    div.newsbody2 {margin: 8px 0px 2px 15px; border: 0px 0px 0px 0px;}
    What am i missing or doing wrong?
    -----------------------------------
    Php and MySql N3wbie forever.................
    -----------------------------------
  2. #2
  3. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    Why don't you post the page uri instead of a screen capture so we can play with it?

    My initial thought is the white space bug.
    Code:
    <img src='Images/newsbanner.gif' 
      width="344"
      height="12"
      border="0"
      alt="NewsBar top" />   <---white space after the <img /> tag
    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.
  4. #3
  5. PHP Newbie forever
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    France
    Posts
    58
    Rep Power
    13
    That seems to be the problem, is there anyway to get around it apart from moving the next line of code to the same line as the img?

    -ali
    -----------------------------------
    Php and MySql N3wbie forever.................
    -----------------------------------
  6. #4
  7. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    It's that or hope that noone uses IE---fat chance.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.

IMN logo majestic logo threadwatch logo seochat tools logo