Responsive layouts

Discussion in 'HTML & Website Design' started by Karolwf, Jun 2, 2014.

  1. #1
    Solved! View solution.
    Karolwf, Jun 2, 2014 IP
  2. ketting00

    ketting00 Well-Known Member

    Messages:
    782
    Likes Received:
    28
    Best Answers:
    3
    Trophy Points:
    128
    #2
    ketting00, Jun 3, 2014 IP
  3. #3
    Find this code in your stylesheet:
    #img_cat {
    width: 12em;
    clip: rect(auto, auto, auto, auto);
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    position: relative;
    height: auto;
    }

    and add "display: inline-block" to this selector. No need to change html or anything.
     
    kenzo22, Jun 3, 2014 IP
  4. BenBlurr

    BenBlurr Greenhorn

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #4
    Now you have:

    #img_cat {
    width: 12em;
    clip: rect(auto, auto, auto, auto);
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    position: relative;
    height: auto;
    }

    Change that into (remove the rest):

    #img_cat{
    width:12em;
    float:left;
    }

    Problem solved! :)
     
    BenBlurr, Jun 3, 2014 IP
  5. Karolwf

    Karolwf Active Member

    Messages:
    112
    Likes Received:
    24
    Best Answers:
    1
    Trophy Points:
    70
    #5
    Thanks. It works.


    Sorry. Did not work. Images are outside the 'div"
     
    Karolwf, Jun 3, 2014 IP
  6. kenzo22

    kenzo22 Member

    Messages:
    177
    Likes Received:
    11
    Best Answers:
    2
    Trophy Points:
    43
    #6
    Glad to help :) Another thing is that you have some baaad html/css practises over there. For example, you have 4 divs with the same id - img-cat. ID should be unique within a document. But it could take some effort to clear this mess up, so you need to decide to rework your site or keep bad code but have it working ;)
     
    kenzo22, Jun 3, 2014 IP
  7. Karolwf

    Karolwf Active Member

    Messages:
    112
    Likes Received:
    24
    Best Answers:
    1
    Trophy Points:
    70
    #7
    I see it. Fixed it. Added name for every div and added a few lines in CSS. No errors at all.

    Thanks again.
     
    Karolwf, Jun 3, 2014 IP