Wrath - YOUTUBE Flash API 2/4
00:18 / 03:46
The enclosing div (classed ppcontrols) is itself enclosed inside a set of tags that are positioned and make fixed-size box (the size of the video element). This makes things nice and workable. You can position and set the size for ppcontrols and then place each element in relation to this div.
I will continue to call each control element by it's class name since these are what you target in your css. Just to make things really obvious, here is a screenshot with the class-names added.
If you want a different look but like the general dimensions you can just start replacing the graphics in the theme folder of projekktor.
To my eyes the standard theme looks very nice. I wanted to keep the same look but make it resize to fit various video sizes. To achieve this I needed to make the size of the main ppcontrols div relative to the video frame. Instead of a fixed width I ended up with this css.
border: solid 2px #fff;
background: transparent url(projekktor/ctrl-bg.png) 0 0 repeat-x;
This creates a control area that always stretches to 20px from the left and right edges. As you can see I also added a css border (with radius) and a new background to get close to the original graphics of the theme while still being flexible horizontally.
The I proceeded to position the elements relative to one of the edges or the middle of the controls area. For example:
With these minor changes to the css the full-screen buttons stick to the right edge and the play/pause buttons stick to the center. Items like the scrubber and the title are positioned in a similar way to the main ppcontrols div. I chose a different css to get the results this time ... just for the variation. Use whichever one you prefer.
The results of my modifications are available for download if you want to take a look at all of it or give it a test-drive.
"demo" (just the v0.6.1 release unpacked and edited)
the css and images in a zip-file