SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2006
    0 Post(s)
    0 Thread(s)

    Question background sliced images and divs


    I have sliced an images I would like to use as part of the background on a pure css based web page.

    I used Fireworks to slice my image. I sliced it into 3 sections, but Fireworks gave me 5 slices, 2 of which are just 1px high.

    I am having problems joining the images together seamlessly.

    I have created 1 image wrapper div and 5 div's "row1" to "row5" to hold the slices of the background image. I have specified no borders and no margains with top and center alignment for all slices.
    On the xhtml page I insert each div immediately under the previous one.
    Even so I am getting spaces between the slices. Any idea how this can be solved?

    Thanks in advance.


  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Hampshire UK
    183 Post(s)
    6 Thread(s)
    Hi Lynn,

    Why are you slicing the images at all? With css you can usually stick the image in the background in one go.

    If you are getting gaps in your images then you may need to set the image to display:block (img {display:block}) and also make sure that there is no whitespace in the html between the image tag and the parent wrapper.

    If that's not the problem then we'd need to see some code or a link


Posting Permissions

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