|
Menu principal
Google Search
LabsSphère Catégories
|
Blog : 456 Berea Street.com
Roger Johansson | 2012-02-02T20:16:54+01:00
| 1 lectures
I recently ran into a problem that was really hard to figure out. I was working on a responsive design where I used img {max-width:100%;} to make sure that images would be downsized rather than overflow in narrower viewports.It worked great everywhere... until I went to check in IE8. The site's logo was gone! None of the usual IE bug fixes cured the problem, and it took me quite a while to realise that max-width was part of the problem.Read full postPosted in Browsers, CSS.Copyright © Roger Johansson
Roger Johansson | 2011-12-16T09:06:31+01:00
| 1 lectures
In an ideal world there would always be a clean way of displaying data supplied by a third party on your site. Two examples would be getting the data in JSON or XML format from a Web Service and having an API to code against. But you don't always have any of those options.Sometimes the only way of incorporating data from a third party is by loading it in an iframe element. A few examples are financial reports, e-commerce applications, and ticket booking applications. Using an iframe is not ideal for many reasons, one of which is that it can make multiple sets of scrollbars appear on the page. Not only does it look ugly, it also makes the site less user-friendly. But there is a workaround....
Roger Johansson | 2011-12-08T19:13:41+01:00
Showing whether a link on a web page has been visited or not can be very useful. One example that many will be familiar with is how it helps you know which links you have already followed from a Google search results page - links to pages you have already visited are a different colour than the other links.Changing only the colour can be a bit subtle though, especially for people with colour vision deficiency. Depending on which colours are used to differentiate between visited and unvisited links it can be hard to tell them apart. To make the difference more obvious, there are a number of techniques involving background images, generated content (like the one I describe in Check marking ...
Roger Johansson | 2011-12-02T09:05:44+01:00
| 2 lectures
When adapting a layout for different viewport widths (a.k.a. responsive design) or media (like print), it's common to reset any float and width values on major layout blocks to linearise their display.Unfloating a floated element is as simple as specifying float:none. Width doesn't seem to be quite as straightforward - lately I've come across several cases where people use width:100% to undo explicitly specified widths when they should be using width:auto instead. So here's a brief explanation of the difference.Read full postPosted in CSS, Quick Tips.Copyright © Roger Johansson
Roger Johansson | 2011-11-24T20:12:33+01:00
| 5 lectures
I just recently ran into an issue when styling buttons that had me pulling my hair for a while. I had my buttons looking the way they were supposed to look in desktop browsers, but when I went to have a look in Safari for iOS, much of my CSS wasn't applied.This was pretty puzzling as I couldn't remember having any problems with buttons in Safari for iOS before. After taking a closer look at the CSS I was using for these particular buttons and the CSS I had used previously, I managed to find out what made the difference.Read full postPosted in CSS.Copyright © Roger Johansson
Roger Johansson | 2011-11-17T20:03:10+01:00
| 3 lectures
As I have noted in a couple of blog posts recently, there are some cases when CSS has quite unexpected results in screen readers (or the way web browsers create the accessibility information they hand over to screen readers). If you haven't read them, the posts are Screen readers, list items and list-style:none and Using display:table has semantic effects in some screen readers.Here are a few examples: Using display:table on non-table elements to get the visual layout characteristics of an HTML table without actually using one may cause screen readers to act as if there was a real table Using display:block or float on table-related elements may cause screen readers to treat the table as a...
Roger Johansson | 2011-11-10T19:07:25+01:00
Back in the day you used to be able to view source on a web page to see the markup used to create it. These days, on many sites, a large portion of the markup is not visible when you view source because it is inserted by JavaScript functions.That isn't necessarily a problem provided that you use progressive enhancement and unobtrusive JavaScript. If you follow those principles, content and basic functionality will still be there when scripting is unavailable. Many of us understand that. But one thing I've noticed is that some developers forget to consider semantics or accessibility in the markup they use JavaScript to insert.Read full postPosted in (X)HTML, Accessibility, JavaScript.Copyr...
Roger Johansson | 2011-11-03T20:04:17+01:00
I've always been wary of styling form elements too much. Possible usability and accessibility issues, browser quirks, and the fact that the CSS specification does not define form control styling are the main reasons.With that said, sometimes you have to do things you don't really want to. Like styling select elements, which I've recently had to find a way to do. There are quite a few workarounds for doing this out there. However, most of the ones I looked at replace the select element with a bunch of links which changes semantics and behaviour a bit too much for my tastes. I couldn't find any implementation that I was completely happy with, so I took the best one I could find and tweaked ...
Roger Johansson | 2011-10-27T20:12:30+02:00
| 2 lectures
It's not exactly news - it was announced in July in HTML5 Parsing in IE10 - but in case you missed it, Microsoft are removing support for conditional comments from IE10.I don't expect this to be a big deal. Actually I'm not sure it will have any impact at all, at least not for me. It's already a rare thing to need to do something special for IE9.Read full postPosted in Browsers.Copyright © Roger Johansson
Roger Johansson | 2011-10-20T19:43:23+02:00
Since uninstalling Flash I've noticed how common it is for sites that still use Flash to pay little or no attention to visitors that do not have Flash Player installed. Showing a "Missing plugin" message instead of navigation links or even worse, the entire site, is an efficient way of turning people away.There used to be a time when "everybody" had Flash player installed. These days there are many millions of iOS users that don't. Apple does not include Flash Player with new Macs anymore (neither is it included with OS X 10.7 Lion). And then there are people who block Flash with browser extensions or uninstall it completely.Read full postPosted in Accessibility, Usability.Copyright © Rog...
Roger Johansson | 2011-10-11T21:51:39+02:00
| 1 lectures
Sometimes you may want the layout properties that HTML tables have, but you don't want the semantics of a table since you're not really working with tabular data. A couple of examples are creating equal height boxes and making an unknown number of items flexibly occupy all available horizontal space.In situations like these you can use CSS to tell any HTML elements you want to behave like they were tables, table rows, and table cells by using a combination of display:table, display:table-row, and display:table-cell. You get the layout you want without littering your markup with tables that shouldn't be there. But there is a slight catch.Read full postPosted in (X)HTML, Accessibility, CSS....
Roger Johansson | 2011-10-04T21:25:39+02:00
Here's a common scenario: you're coding up a form with lots of buttons or need to add some elements that trigger JavaScript functions, and in the design comp some of these elements look like links. You intuitively reach for the a element, put some in the markup, add event handlers to them, and style them to match the design.But wait a bit. Leaving the issue of putting elements that may rely on JavaScript to work in the markup for another time, should those elements really be links? What does the text on them say? What happens when you click them? If they trigger some kind of action that doesn't match the normal link behaviour of going to another URL, it's quite likely that you should real...
Roger Johansson | 2011-09-28T20:56:49+02:00
| 1 lectures
On September 25, Authentic Jobs turned six (I've been a listing partner for almost five years). To celebrate that sixth birthday, this week you can save quite a bit when posting a job listing: Post a job on authenticjobs.com and get 50% off Post a job on uk.authenticjobs.com and pay just £1.00But that's not all. As part of the birthday celebration there is also a campaign to raise 600 000 Ethiopian Birr (? USD 35 000) for charity:water. The goal of the campaign is to give the people of Northern Ethiopia access to clean water. You'll find more info about the campaign on the Authentic Jobs charity:water Campaign 2011 site.Read full postPosted in Job openings, Life.Copyright © Roger Johansso...
Roger Johansson | 2011-09-22T21:43:46+02:00
| 1 lectures
Recently I needed to free up some space on my Mac's internal hard drive and decided to move my Virtualbox virtual machine disk images to an external drive.At first I thought it was going to be as easy as just copying the .vdi files to the other drive and then pointing each Virtualbox machine to the new location of its corresponding .vdi file. Turned out it isn't quite that easy.Read full postPosted in Virtual Machines.Copyright © Roger Johansson
Roger Johansson | 2011-09-14T21:10:23+02:00
| 1 lectures
It's more or less common practice these days to use real HTML lists when what you're marking up makes logical sense as a list. If you don't want it to look like a standard ordered or unordered list, that's easy to fix with a bit of CSS. The underlying semantics will still be there for people using browsers without CSS support or screen readers.But will it? The short answer is no, not always.Read full postPosted in Accessibility, CSS.Copyright © Roger Johansson |