Recently, I needed to create a centered version of the Suckerfish dropdown menu and realised that some significant modifications were going to be needed. This is because the method for getting the top level list items to sit in a row, on the same horizontal plane, is to use float: left
. However, when you float elements, you can't centre them unless you give them a width and use auto left and right margins.
CSS Articles
Legends of Style
UPDATE: following on from comments by Thierry Koblenz, I have written an update to this article. The techniques described below will still work in different browsers, but the new article explains how it can be achieved with a little less mark-up.
It's a well-established fact that achieving cross browser consistency when styling form controls is an “exercise in futility”
. And one of those elements that just won't play ball is the legend
tag.
Dropdown low down
Dropdowns (horizontal) or flyout (vertical) menus abound on websites and come in many different flavours. They are also put together in a number of different ways, some done with javascript, some with 'pure' CSS and some a mixture of both.
Why does my content flow outside its box?
Usually this question is accompanied by: "It looks fine in Internet Explorer but not Firefox"
and it's usually because a height
has been specified on the element in question.
Don’t use IE as your primary testing browser
As mentioned in previous posts, I spend some time on web design-related forums so a lot of what I've written on this site has been in response to questions I see asked quite often. This post is not so much about a question, but a reaction.
Styling form buttons
Anyone who's used the web has encountered buttons in forms. Buttons, as with most form controls, can be a bit tricky to style for consistent look cross browser and cross platform as the operating system often has more to do with how they are rendered than the browser itself. Roger Johansson has delved into this issue in more detail.
Content bookends
Sometimes you want to have a list of text items or images appear on the same line but with some items aligned to the left and some aligned to the right. An example of this would be a footer where you want to split the links down the middle. Or maybe a blog post where you want to put the date on the left and the number of comments on the right.
Onfocus, background-changing, sliding door tabs
There are already several excellent articles discussing the sliding door tabs technique for creating navigation elements, so why do we need another one? (For those who don't already know, sliding door tabs, originally conceived by Douglas Bowman, are navigation tabs made up of two separate background images which allows for the tabs to expand and contract when the user resizes the text in their browser.)
Elastic layouts
Prompted by a comment from Mike Cherim of Accessites in answer to my post on Zoom Layouts, this post is to list Elastic Layouts.
Zoom layouts
I came across an article today on A List Apart written by Joe Clark: Big, Stark & Chunky (it is 18 months old - I know, I should read ALA more often) which was aimed at promoting the use of 'zoom layouts', which are those designed for people with low or impaired vision.