|

July 2013 – CSS Responsive Menu

When your website has it’s main navigation as tabs across the top of the page, how will these appear when viewed on alternate media? If the design is to be “responsive”, ie: elements wrap down into columns depending on the available screen width, the links can also wrap down – OR, they can change into a drop-down <select> box. In terms of design, a drop-down box may be preferable and take up less space than links wrapping into multiple lines.

Option using jQuery

The navigation links are set up as an unordered list, and CSS styling sets them at a fixed width. Using a media query to determine the width of the browser window (or alternate media) – the navigation becomes a <select> drop-down box when it falls below a certain width (in this case under 600-px wide) .

Option without jQuery

This version only uses CSS, however, the menu needs to be coded in twice. This could be a realistic option IF there are not many navigation links, and/or the target audience requires less use of scripts.

Related links:
http://css-tricks.com/convert-menu-to-dropdown/
http://css-tricks.com/unobtrusive-page-changer/
http://bavotasan.com/2011/style-select-box-using-only-css/

 

Similar Posts

  • | | | |

    June 21, 2011 – WordPress Gallery Plug-ins

    There are many image gallery plug-ins for WordPress which provide a way of showing images in galleries and albums and use the version of the ‘lightbox’ overlay. NextGen Gallery by Alex Rabe – Download the NextGen Gallery plug in. (The current version needs PHP 5.2 to run) http://alexrabe.de/wordpress-plugins/nextgen-gallery/ Older versions can be downloaded which run…

  • |

    Multi-Media Display

    Website design is no longer a “What You See Is What You Get” situation. What YOU see can differ considerably from what someone else sees. It’s very easy to be visually/mentally seduced into believing that your design is consistent across the web. However, with your pages being opened on anything from wide screen monitors, to small…

  • | |

    May 2013, Divs, Floats and Clears

    Using CSS and Div’s for layout. Div’s contain the information to layout the site, but making them behave in a predictable manor is not always easy. Floats are used to control positioning, (left or right) but multiple elements will need to be “cleared” to line up correctly. http://www.sitepoint.com/using-css-grid-layout-and-blend-5-to-build-a-game/ http://960.gs/ http://unsemantic.com/ http://caniuse.com/css-grid http://designfestival.com/design-organized-websites-rapidly-with-960-grid/ http://layouts.ironmyers.com/ http://css-tricks.com/all-about-floats/ http://www.quirksmode.org/css/clearing.html

  • | |

    WordPress Child Themes

    WordPress uses “themes” to display the content of the database in a user-friendly and attractive interface in the browser. Deciding which theme to use may be determined by the site requirements, some themes have additional features that may be required – or not. Don’t use a theme with all the Bells & Whistles if you don’t need those…