Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
190
rated 0 times [  192] [ 2]  / answers: 1 / hits: 8072  / 11 Years ago, sun, december 29, 2013, 12:00:00

The Facebook code:



<div class=fb-like-box data-href=http://stackoverflow.com/ data-width=160 data-height=100 data-colorscheme=light data-show-faces=false data-header=false data-stream=false data-show-border=false></div>


I am trying to change data-width={n} and/or data-height={n} dynamically on screen size change (smartphone/tablet orientation change) using either javascript or CSS media queries.


More From » css

 Answers
10

Try adding this to your css code:



.fb-comments, .fb-comments iframe[style], .fb-like-box, .fb-like-box iframe[style] {width:  100% !important;display:block;z-index:2000;position:relative}
.fb-comments span, .fb-comments iframe span[style], .fb-like-box span, .fb-like-box iframe span[style] {width: 100% !important;display:block;z-index:2000;position:relative}


Hope it helps..


[#49154] Saturday, December 28, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
madalyngriseldas

Total Points: 167
Total Questions: 92
Total Answers: 85

Location: Iceland
Member since Sat, Sep 17, 2022
2 Years ago
;