Add something new to Virb:

Virb

Are you sure you want to delete that?

or Cancel

 

Imported on Feb 18, 2009

Fixing The Web With Attribute Selectors

If you’re like me, there are website that just bug you how they did something, or the amount of ad’s they display are annoying. With the power of Safari, CSS, and Attribute Selectors, we can change how we have to view the web. Here is what I have in my short but helpful CSS file.

a[target="_blank"]{border-bottom: 1px solid #CC0000;}
a[href*=".zip"]{border:1px solid yellow;}
a[href^="mailto:"]{border:1px solid blue;}

The first one shows me if I’m about to click on something that is going to bring me to a new window, now I can just right click and open in a new window.

The second one is more just for trying it out, it’s not often you click on something and get a zip file instead of something else you were expecting, but this could be useful for movies or anything you want to know that has a .something ending.

Now the last one is pretty helpful. I hate when I think I’m going to a contact forum and it turns out it opens Mail app and opens a new email. So those are a couple way to improve your browsing experience.

When I visit some sites, I can’t stand all the ad’s they have, it’s like they paid attention to the UI and workflow of the site, and they threw in some ad’s. So this is how I got rid of some of them. Don’t get me wrong, I understand these sites need ad’s to survive, but they shouldn’t have ruined the site by putting them everywhere. So here is what I did to clean things up a bit.

iframe[width="300"][height="250"],
iframe[width="160"][height="600"],
iframe[width="728"][height="90"]  {display:none!important;}

So as you can see, if it’s an iFrame with a certain width / heigh then I’m telling the CSS to display none. No more ad’s. Not you can take this a lot further and I would like to see what people come up with, so if you do something cool, post them in the comments.

Loading comments...

Likes

Details

Via Stephen Korecky

Viewed 38 times

© 2009 Stephen

virb.com/t/2028209
tweet!

Flag this text post!

Flag this text post as:

or Cancel

 

Advertisement

Flag this profile!

Flag this profile as:

or Cancel