CSS: Responsive Video

The CSS Framework i worked on is able to handle all types of responsiveness, but not video. So I did a bit of research and found a piece of code that does the trick. Wrap the embedded video in a container as follows:

Making Foundation 5 top bar working with WordPress Menu

wp_nav_menu() is a WordPress function to display menu defined with register_nav_menus() in functions.php. When using foundation framework in a WordPress theme, the standard way to use wp_nav_menu() works if you have a single-level menu, ie no drop-downs. It’s when it’s a multi-level menu with sub-menu in the drop-down that it won’t look nor work properly…

Continue Reading »

Yii: CSS file order with registerCssFile

In Yii there are different ways to include stylesheet. It can be done by inserting HTML code into header page, as shown in default layout files (eg yii/protected/views/layouts/main.php). it can also be done by calling registerCssFile(). I’ve been using the HTML code method because that’s the default when setting up an Yii project. Recently I wanted to…

Continue Reading »

CSS3: Detecting devices with media queries

CSS3 has media queries that enables conditions to check device properties such as width, height and orientation and applies different stylesheet definition based on these conditions. This is useful since we’re able to browse via different devices with different sizes and we want to ensure the site is displayed optimally and more legible. Very often…

Continue Reading »