Auto center and resize embedded media

View previous topic View next topic Go down

Auto center and resize embedded media

Post by Guest on 1/24/2015, 5:00 pm


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 ...

phpbb3

[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;}

Back to top Go down

Re: Auto center and resize embedded media

Post by brandon_g on 1/25/2015, 2:07 pm

avatar
brandon_g
Member
Member

Posts : 22
Reputation : 0
Join date : 2015-01-22

View user profile
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

Back to top Go down

Re: Auto center and resize embedded media

Post by brandon_g on 1/25/2015, 2:14 pm

avatar
brandon_g
Member
Member

Posts : 22
Reputation : 0
Join date : 2015-01-22

View user profile
Oh ok cool, thanks for the quick reply Samantha.

And thanks for the advice too! I will do that from now on. Smile

Back to top Go down

Re: Auto center and resize embedded media

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum