CSS: two identical elements display differently on 2 different websites [closed]

StackOverflow https://stackoverflow.com/questions/23442571

  •  14-07-2023
  •  | 
  •  

문제

On a development site, I have some social widgets set up correctly.

I can't replicate this on the production site, even though I'm sure I'm using the same CSS.

enter image description here

The padding-bottom on li.twitter-balloon is overlapping with the padding-top of li.linkedin-balloon. Why is this occurring on the production site and not on the development site? Thanks.

도움이 되었습니까?

해결책

I think the CSS you are using are not exactly the same.

On your production site, in line 294 (or another line number with the same content) of your style.css file, you have margin-bottom:-10px;, which is the reason why they are different. If you delete this line, they will look the same.

다른 팁

On dev server your css is

.twitter-balloon {
    background: url("images/twitter-balloon.png") no-repeat scroll right 15px rgba(0, 0, 0, 0);
    border-top: 1px dotted #D8D8D8;
    padding: 20px 0;
}

on live its :

.twitter-balloon {
    background: url("images/twitter-balloon.png") no-repeat scroll right 15px rgba(0, 0, 0, 0);
    border-top: 1px dotted #D8D8D8;
    display: block;
    margin-bottom: -10px;
    overflow: auto;
    padding: 20px 0;
} 

just remove margin here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top