Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sunday Morning Challenge

Featured Replies

So I was a bit bored after watching the F1 today, and I was on the Sky Sports website and thought to myself, this website is incredibly image intensive, and rightly so, so much of it visually must be a royal pain to create any other way. Images just make sense for it.

 

But I decided to have a go anyway, at reproducing the headlines on their F1 page, using purely only CSS.

 

There is unfortunately a bug, which I can't seem to find a fix for yet, see if you can spot it. I have only tested this in Chrome too so I don't really care if it breaks in IE if I'm honest. It probably will.

 

And maybe you should have a go too, see if you can do better!

 

My attempt: http://jsfiddle.net/brightonmike/PDeaZ/3/

 

The headlines are on this page: http://www1.skysports.com/formula1/

 

Just a bit of fun but I think I did ok! Not quite the same but damn close...wondering if I could use psuedo-elements to reduce markup.

 

If you do have a go, the condition is that at no point must you use an image. No images!

Edited by brightonmike

I like the idea of challenges could we perhaps make it a more regular thing? Even for people fairly new to it like me, I think it would be a great way to learn more from you guys and have to do things better

  • Author

I agree. I'm thinking of doing a fortnightly challenge via WDF. There's nothing stopping anyone trying this one though! Still nobody has pointed out the bug or suggested a fix...

  • Author

You should give it a go no matter what it is! The above one is not too difficult, it is just using CSS3 techniques to style a header. Give it a go! You can achieve it using gradients, CSS transforms, border-radius, text-shadow, box-shadow.

  • Author

OMGZ I can't believe you made that guy's face in CSS!

 

 

You know, technically, I think you probably could. 1px square divs, thousands of them. Each with a different background colour.

 

Would be extremely messy however! And take ages to colour pick the picture etc.

 

Or, base 64!

 

I just couldn't resist.

Edited by brightonmike

 

Or, base 64!

 

 

 

That's insane - and not in the 'hip' American kind of way

 

 

Pity the pic wasn't of David Coulthard - one big square pixel would have done most of his face

Edited by oakleaves

  • Author

You know the interesting thing is, the base64 encode of that image is 36kb. The original image is nearly 90kb. That's a decent file size saving right there.

You know, technically, I think you probably could. 1px square divs, thousands of them. Each with a different background colour.

 

Would be extremely messy however! And take ages to colour pick the picture etc.

 

Or, base 64!

 

I just couldn't resist.

 

Now that sounds like something I could get in to. CSS mosaics!

  • Author

Imagine if you had a picture made up of 1px divs. You could do all sorts of weird things with the hover effects, making it morph into other pictures, or change shape/size.

 

Someone needs to write a script to generate the divs and pick the colours from the pictures....I wonder if that's possible.

Using these sort of techniques to render images (obviously not including website structure which seems to be the way forward) at this point in time, is only for people who are not too worried about cross-browser compatibility.

  • Author

Using these sort of techniques to render images (obviously not including website structure which seems to be the way forward) at this point in time, is only for people who are not too worried about cross-browser compatibility.

 

You're right in a way, even between FF and Chrome there are discrepancies. But I was surprised at how well it degraded in IE8, it basically just became two square headlines, and there was even still gradients because my code uses the filter property.

 

For now, sure, I wouldn't use these yet. But I think it's great to have a play around, and once IE8 fully dies out I think we will be able to start using these techniques more widespread.

 

We hope!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.