Auto center and resize embedded media
Liquid Code :: Coding Factory :: Css
Page 1 of 1 • Share
Auto center and resize embedded media
Guest- Guest
Does your forum look like a mess when people start to post those all time favorites from YouTube for instance? Lost track of moderating those posts by everyone? Well, here's a very simple CSS trick you can use to instantly and automatically center and resize each and every one of them now! Fire and forget ...
[css]
### = number of px.
The "margin:0 auto" will center the video automatically, best fitting the post.
Example:
[css]
- Code:
.post .postbody .content.clearfix div embed {
display:block !important;
margin:0 auto !important;
width:###px !important;
height:###px !important;
}
### = number of px.
The "margin:0 auto" will center the video automatically, best fitting the post.
Example:
- Code:
.post .postbody .content.clearfix div embed {display:block !important;margin:0 auto !important;width:800px !important;height:600px !important;}
Re: Auto center and resize embedded media
brandon_g- Posts : 22
Reputation : 0
Join date : 2015-01-22
So how does it re-size it? Does it resize so all videos are 1 specific size? Or does it just center it?
Looks cool too!
-Brandon
Looks cool too!
-Brandon
Re: Auto center and resize embedded media
brandon_g- Posts : 22
Reputation : 0
Join date : 2015-01-22
Oh ok cool, thanks for the quick reply Samantha.
And thanks for the advice too! I will do that from now on.
And thanks for the advice too! I will do that from now on.
Liquid Code :: Coding Factory :: Css
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum