SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    image map inside of a div, adds space around image

    hey,
    I've been working with css only layouts lately, as have so many others, and one things I've run accross is that if you have an image inside of a div, you can get the div to wrap flush with the image, but if you add an image map it adds some padding. Anyone know a workaround for this?

    I'll try to illustrate what I'm talking about.
    <div----------------------------------------->
    <image goes here ---------------------------->
    </div---------------------------------------->
    <div----------------------------------------->
    </div---------------------------------------->

    this works fine, the first div containing the image can be set to the same size as the image creating no border, but if you do add an image map, a 10 or so pixel space is inserted between divs:

    <div----------------------------------------->
    <image goes here ---------------------------->
    <map>
    <area>
    </map>
    </div---------------------------------------->
    <10 px space pops up here ------------------->
    <div----------------------------------------->
    </div---------------------------------------->


    I need the image mapped image in the first div to be flush with the second div, the space screws the flow of my design.
    I have everything working without the image map...

    I hope somebody can shed some light on a trick to get around this or maybe somthing I've overlooked?

    thanks,

    aaron

  2. #2
    (****** or Deleted)
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe set a style:

    Code:
    map {
      margin:0px;
      padding:0px
      }
    This is purely speculation though, no idea if it will work, do not use image maps at all sorry...

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no.. I've already tried that.. it doesnt work

    aaron

  4. #4
    SitePoint Member
    Join Date
    Sep 2002
    Location
    East Coast
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried recreating your problem and all I can think of is to have your div the image and the map coordinates all on one line with no breaks.

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2000
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey, thanks a lot man
    that did the trick, awesome

    I had tried putting some of the elements all on one line but evidently I didn't put them all on one line, once I did that things popped into place perfectly.

    again, thanks a lot.. now I've got all of the formatting for the design done.. just need to pop the content in

    aaron


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
  •