Skip navigation
Currently Being Moderated

Spaces under images

Sep 15, 2012 1:25 PM

Hi, I have a column of two rotator and two images down the right side of the page (in the link below), the first rotator is just where I want it to be but as I go down the gaps get to wide, but I only want about 10px between them, I've tried doing -10px and -20px but this don't seem to make any difference, can some one help me please. Thanks Jeff

 

http://www.http://thecarpetandflooringconsultant.co.uk/residential-dom estic_carpet_and_flooring.php

 
Replies
  • Currently Being Moderated
    Sep 15, 2012 2:09 PM   in reply to Jeffrey54 Lane

    Not sure where images are getting their top margins from but increasing their negative top margins seems to work

     

      

    #rotator-two {
        float: right;

        height: auto;

        margin-right: 7px;

        margin-top: -80px;

        width: 370px;

    }

     

    #third_level_image {
        float: right;

        height: auto;

        margin-right: 60px;

        margin-top: -140px;

        width: 210px;

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 15, 2012 3:32 PM   in reply to Jeffrey54 Lane

    Quick design tip:  Open your CSS file and at the top add this:

     

    * {border: 1px dotted blue}

     

    This will put borders around every element in your page so you can see why your images are aligned this way.   That's how floats work.

     

    Try removing float:right from your images and use margin-left (adjust values to suit):

     

    #rotator-one {

        margin-left:600px;

        margin-top: 0px;

        margin-right: 7px;

        height: auto;

        width:370px;

    }

    #rotator-two {

        margin-left: 600px;

        margin-top: 10px;

        margin-right: 7px;

        height: auto;

        width:370px;

    }

    #third_level_image {

        margin-left: 700px;

        margin-top: 10px;

        margin-right: 60px;

        height: auto;

        width:210px;

    }

    #fouth_level_image {

        margin-left: 740px;

        margin-top: 15px;

        margin-right: 110px;

        height: auto;

        width:120px;

    }

     

    Don't forget to remove the * borders.

     

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 16, 2012 8:48 AM   in reply to Jeffrey54 Lane

    I’ve done what you said, and I can see where you are going with it, but when the first rotator go’s to the top the photos disappear from view,

    Can you show us that?

     

     

    so what I have done is, I’ve tried applying the same CSS method to the main image in the top left hand corner,

    Wasn't that image originally up higher on the page and floated left?

     

    Put it back where it was.  Incidentally, floats must come first in the markup.

    http://alt-web.com/DEMOS/CSS2-Captions-on-floated-images.shtml

     

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points