|

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

  • | |

    Where is web DESIGN heading?

    With Windows 8/touch screens, iPads and cell phones becoming mainstream for web browsing, what should designers take into consideration when planning a new website layout? Start by understanding the user experience, and your potential viewer. What kind of content will the user be looking at? Will they be shopping, reading, viewing image galleries – and…

  • CSS Goodies

    Websites worth a visit, CSS goodies to explore. http://www.colorzilla.com/gradient-editor/ http://css3gen.com/ http://css3menu.com/ http://css-tricks.com http://css-tricks.com/examples/AnythingSlider/ http://css-tricks.com/downloads/ http://bit.ly/sG04Eo http://www.design.annagraphics.com/tutorials/tweaks.css http://www.design.annagraphics.com/tutorials/cssfixes.pdf 

  • |

    December 2012

    Thoughts about the effects of color – How does color affects your target audience. (Know your audience!) There are many factors that contributes to how someone perceives color. Taking color choices into consideration when developing a web design/color sceme can contribute to succuss – or failure. Colors have different meaning in different cultures and religions, so…