Title: oEmbed float wordpress and css styling options?
Last modified: August 20, 2016

---

# oEmbed float wordpress and css styling options?

 *  [luxman](https://wordpress.org/support/users/luxman/)
 * (@luxman)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/oembed-float-wordpress-and-css-styling-options/)
 * I added:
 * `if ( ! isset( $content_width ) ) $content_width = 300;`
 * to my functions.php which made the youtube embed of videos smaller; however I
   would like to further style the video so it fits with my site’s theme. I would
   like to make it float to the left, add a border and some other stuff.
 * Is there another way to change this via the functions.php file?
 * thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [luxman](https://wordpress.org/support/users/luxman/)
 * (@luxman)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/oembed-float-wordpress-and-css-styling-options/#post-3627461)
 * I found this code:
 *     ```
       add_filter('embed_oembed_html', 'my_embed_oembed_html', 99, 4);
       function my_embed_oembed_html($html, $url, $attr, $post_id) {
         return '<div id="video">' . $html . '</div>';
       }
       ```
   
 * Which works but not sure if it messes anything else up?
 *  [Hassang](https://wordpress.org/support/users/hassang/)
 * (@hassang)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/oembed-float-wordpress-and-css-styling-options/#post-3627720)
 * Your code works great !
    I changed the id of the div to a class since am embedding
   lots of videos ! Thanks a lot ^^

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘oEmbed float wordpress and css styling options?’ is closed to new replies.

## Tags

 * [oEmbed](https://wordpress.org/support/topic-tag/oembed/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Hassang](https://wordpress.org/support/users/hassang/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/oembed-float-wordpress-and-css-styling-options/#post-3627720)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
