Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS image border

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43643
    devil3682116
    Participant

    when i give border for an image in my css and i resize the screen the border area goes outside the wrapper..any help..i am using skeleton framework for responsive design

    #129602
    Merri
    Participant

    Easiest fix to make border go equally outside the wrapper is to give as much negative margin as you have border. `border-width: 2px; margin: -2px;`

    Also giving image a width to reduce it’s size would work.

    #129604
    chrisburton
    Participant

    Wouldn’t `-[browser prefix]-box-sizing: border-box;` be appropriate?

    * {
    -webkit-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    }

    #129606
    devil3682116
    Participant

    hmmm both of your suggestion works..THANKS!! but last one is perfect!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.