Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Unable to center an embedded flickr slideshow with div and CSS

Unable to center an embedded flickr slideshow with div and CSS

Problem

The code looks something like this

...flickr slideshow code ....

And then the CSS like this

div.body {
    height: 600px;
    width: 1024px;
}

.flickr {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 600px;
    height: 450px;
    margin-top: 50px;
}

The embedded object just sticks to the left top of the parent element. None of the centering CSS works on it.

I can specify align="center" in the div in the HTML and get it centered but then the margin-top in CSS won't work on it.

Problem courtesy of: devcoder

Solution

Check this updated fiddle

http://jsfiddle.net/bta5Q/20/

Solution courtesy of: Sowmya

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

Unable to center an embedded flickr slideshow with div and CSS

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×