I'm trying to horizontally center the OSM player that is playing a CCK filefield upload.

I've tried

div#mediafront_openstandardmedia {text-align:center; }

which is not working.

What am I missing?

Comments

travist’s picture

Status: Active » Fixed

Yeah, it is HTML so you will need to use good-ol-fashion CSS to do this. What you did above only works for Flash widgets. I would just use margin-left until it looks center.

greygoo’s picture

Hmm... I'm trying margin-left but I can't get anything to change.

Is

div#mediafront_openstandardmedia

the correct css class to apply margin-left to?

greygoo’s picture

Status: Fixed » Active

Ok. So I got a little bit further this time by using padding-left instead of margin-left, in my theme's style.css:

#mediafront_openstandardmedia { padding-left:30%;}

which moves the player but not the background for some reason, like this:
http://img.skitch.com/20100921-kinas4672rs89fchu7jkr2a5bs.jpg

How do I also move the background (the one with this background image: ui-bg_loop_25_000000_21x21.png) along with the player?

Still, I can't believe that it's not possible to horizontally center the OSM Player. Padding-left is a less than ideal workaround and will make it harder to display consistently across different resolutions if you have a horizontally centered layout.

travist’s picture

Wrap it in a DIV, and move the parent DIV.

enjoylife’s picture

Status: Active » Closed (fixed)