I coded up a little tool for web designers. It's a bookmarklet/favelet that provides you with a "height map view" of the page you're looking at—that is, more deeply nested elements are given a lighter background.
It's a hassle to explain, but if you click the link below you'll see what I mean.
Link: Topographic view
Refresh the page to restore it.
If you want to use it with other pages, just drag the link to your browser's Links bar. Then click it while viewing a page to see it in all its skeletal splendour.
Notes:
After a suggestion from Peter in the comments, I've updated the bookmarklets on this page to shade the first 16 layers of nesting. (It was 10 in the original.)
Jesse Ruderman wrote a faster version which supports the major browsers with the exception of Safari. You can find that at squarefree.com.
Joseph | | Comments(42)
Copyright © 2006 Joseph Pearson, some rights reserved.
This work is licensed under a Creative Commons License.
Comments
pixelkitty
This is great. Makes it very easy to see the level of elements. Nice.
andrei
This is really awsome, thank you for the bookmarklet. This is trally, really, cool, seriously.
Chris Vincent
Seems to work in Safari 1.2. Great work!
Timen
I never knew I was always looking for this. Good work.
Cheah Chu Yeow
Damn this is awesome. Thanks for sharing this. Very useful for checking unclosed divs, I can foresee.
Mike Owens
Very very cool. Now if someone can impart a 3-D aspect to it so that higher elements are crisper, and further elements fuzzier…
Patrick Hall
awesome, well & truly.
Luke Melia
very cool
tommy
Very useful extension for Mozilla browser you can find here:
http://chrispederick.myacen.com/work/firefox/webdeveloper/
tommy
Very useful extension for Mozilla browser you can find here:
http://chrispederick.myacen.com/work/firefox/webdeveloper/
Seairth Jacobs
In case one uses this on a table-happy page with Mozilla 1.6, Mozilla will implicitly add such elements as TBODY into the DOM even if you do not have them in the source. I am guessing this is true of other browsers as well. So the script isn’t broken when you see all of that pink, it’s just the extra implicit elements you weren’t expecting…
Joseph
Yes that’s true Seairth. And different browsers do produce different maps for this reason—Opera’s seem to be slightly girthier than IE’s and Gecko’s, for instance. But it’s all relative, of course.
Thanks to everyone for the feedback. :)
Carina
it’s great! thanks a lot! :)
Lucian
Amazing work. It’d be cool if you could add snow textures for top level, earth textures and sea for the deeply nested stuff. Oh, and if we could rotate it in 3D…
Ruben
Nice job.
visitor
cool
Fabian
Nice. Thanks :)
Mozinet
Trackback :
French Blog : Topographie des pages Web
http://blogzinet.free.fr/index.php?2004/04/11/135-TopographieDesPagesWeb
Voici un nouveau bookmarklets pour développeur Web…
Thanks ! That works on Mozilla 1.7b.
Jesse Ruderman
Mike Owens: Change
e.style.backgroundColor=c; e.style.borderColor=c;
to
e.style.backgroundColor=c; e.style.border=”1px outset ” + c;
and it gains a 3D look. You’re right — the 3D look helps.
Paul Anthony
Aw lovin’ it- Bookmarklets are a great way to make life easier for the developer.
peter
this is the second time I come in touch with a bookmarklet (the 1st make me wonder, but I didn´t understand what it was) and it´s kinda breakthrough. This is a must have for any webdesigner — great !
I´ll go into bookmarklets now, thanks!
peter
Change:
you can use toString() with a parameter:
with r.toString(16) you get the number as a hex-string.
That means you can change
if(r>9) to if(r>16)
that gives you a depth of 16 instead of 9
also if you add a line
c=c.substring(0,7);
you can then remove the “if(r>9) …” part and get even more depth (although colors may look ugly)
JP Honeywell
Jesse Ruderman (et al): Regarding your change
Be very careful about just doing a copy/paste because the quotation marks in ”1px outset ” are not what you get from the keyboard. Took me a couple minutes to get that but once I replaced them it worked.
You old pros probably already knew that though.
julik
Brilliant!
Andy
I love this!
Tacho
it´s really cool! THX
p2
nice thingie! but why doesn´t it work on k10k.net?
Joseph
It appears not to like the frames on k10k.net. If you open any of the frames in a new window (right-click on a frame in Firefox), and then apply the bookmarklet, it works.
I’ll get around to investigating this when I have some time.
balloonhead
Extremely useful. it helped me tracking down some errors in my tables and layers. Will fix them soon. What a pity it does NOT support IE as a bookmark. But who cares when Opera has no problems with the link.
Joseph
Hmm, works for me in IE6. Can you give me any more info?
colin gilchrist
Whoa, very VERY useful insight into table structures without adding distorting borders. Definitely one of my favorite favorites! Now how to work out ho to undo it without refreshing…
horses rule!
horse!!!!!!!!!!!!!!!!!!!!!!( i am random)
anonymous
I don’t get it. I tried dragging the link to the brower’s link bar, which is impossible. I saved your page in favorites, loaded another page and returned to your page and refreshed. What am I doing wrong?
Joseph
Right-click on the link, and from the context menu that appears, select “Add to Favorites…”
anonymous
Very cool!
This is absolutely great. I hope you will add these instructions above so all cant take advantage of this marvelous gadget you have invented here.
Marco
Really a good work!! Pretty cool!
not tellin
yay poop!!!!!!!!
Tom
Cooooool………..
rachelle
hey go to mi site………..www.rachelle002.piczo.com
Haare
Amazing - good work…..
Web
Cool, I never knew I was always looking for this.
Arzt
Thanks, i have bookmarked it!!!
Ciao, Arzt