SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table and image have a "space" between them?

    Hi,

    I'm trying to make it so I have:

    <image>
    <table

    However, the "image" is the top part of the table.

    Now - this works, BUT there is a white space between the image and the table.

    Can anytone suggest how I could fix this? I've tried doing padding-bottom: 0px; and margin-bottom: 0px;

    ..but neither of them seem to work :/

    TIA

    Andy

  2. #2
    SitePoint Zealot mudflow's Avatar
    Join Date
    Jul 2008
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Edit your page properties, I mean the body properties, if that doesn't work, set the vertical spacing to zero.

  3. #3
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Example please?

    TIA

    Andy

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Set vertical-align:bottom or display:block for the image. It's a replaced inline element and generates an inline box by default. That box is vertically aligned to the text baseline unless you state otherwise. And since the baseline is a few pixels above the bottom edge of the line box, there will be a gap.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Thanks for the reply - we ended up just using a <div with a background: (url) with no-repeat, and that worked a charm

    Cheers

    Andy


Bookmarks

Posting Permissions

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