Ruslan Ulanov’s Codeshack

The developer’s notebook

Archive for the ‘CSS’ Category

CSS property: text-overflow

leave a comment

A better way to display lines that are way too long to fit in one line:

.longline {
  width: 200px; /* width is required */
  white-space: nowrap;
  overflow-x: hidden;
  overflow-y: hidden;
  text-overflow: ellipsis;

Written by Ruslan Ulanov

November 18th, 2010 at 2:43 am

Posted in CSS

Tagged with ,

data Protocol – embed your data

leave a comment

Recently, looking for a completely unrelated subject I discovered that IE8 now supports the data protocol.

What is a data protocol?

In a few words, it’s a way to embed any data (like GIF images, for example) into text documents such as HTML or CSS. So, instead of linking to an external file, you can do something like this:


SRC='data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAA wAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfz gFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiO Spa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZ eGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81  M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7'

Read the rest of this entry »

Written by Ruslan Ulanov

July 8th, 2009 at 2:31 pm

Posted in CSS,HTML

Tagged with

Mobile Web Best Practices 1.0

leave a comment

The World Wide Web Consortium (W3C) has recently published a document called Mobile Web Best Practices 1.0.

This document specifies Best Practices for delivering Web content to mobile devices. The principal objective is to improve the user experience of the Web when accessed from such devices.

It’s a good step toward making the Web accessible to millions of small screen devices, not blessed with a combination of iPhone’s hi-res LCD and a powerful Safari browser. 🙂

The document is available from W3C’s web site

Written by Ruslan Ulanov

August 7th, 2008 at 2:30 pm

Fixing IE6/IE7 style issues

one comment

Check out Cascading Style Sheet Compatibility in Internet Explorer 7 article at MSDN.

It explains how to address IE7 compatibility issues in CSS.
In short, there were several bugs in CSS parser of IE6. Some CSS constructs (filters) that were applied by IE6 are ignored by IE7 and above – like “* html”. We could take advantage of these broken filters to create IE6-specific rules.

Read the rest of this entry »

Written by Ruslan Ulanov

May 27th, 2008 at 7:40 pm

Posted in CSS,HTML

Tagged with Knowledge Base

leave a comment has a nice collection of FAQs on DHTML, JS, Java, CSS, etc.

Written by Ruslan Ulanov

May 5th, 2008 at 7:07 pm

Use CSS to create an image map

leave a comment has an article on using CSS to create an image map. Nice and simple technique though it won’t work if you need to define complex shapes (like state boundaries on the map of USA, etc.).

Written by Ruslan Ulanov

April 29th, 2008 at 8:37 pm

Posted in CSS,HTML