It has become fairly common practice to use CSS to fill the contents of an empty DIV tag. For example, I’m working on a project now that uses the following DIV:
And with CSS I’m giving that div a fixed height and a repeating background image that creates the appearance of a shadow being cast upward on top of my main nav.
The problem is that IE6 thinks that the empty space consists of text. Empty text, but text nonetheless. So what happens is that whatever the default font size for that particular DIV becomes the height of the DIV, rather than my specified height: 6px; in the CSS. There are 2 fixes for this problem, one of which I’ve been using forever and another I just stumbled upon and which prompted me posting both solutions. Both are fairly easy.
This solution is the one I’ve been using forever. Basically, you just choose a font size that’s smaller than the height you are setting.
That usually does the trick. But this has always seemed wrong. I can’t say why, it just feels weird. Maybe it’s the fact that I’m setting a font size for no text at all.
This solution I found this week and actually makes more sense to me. It involves using simple HTML comments. And not the [if IE] stuff either. Just a plain simple comment:
<div id="main_nav_top_shadow"><!--Leave this empty--></div>
It does not matter what text you put in there. It’s not any command to the browser or anything. But it works, by darn! I guess IE6 feels more comfortable not having anything in that div, as long as you put a comment there.
Not only does that work, but it is the right thing to do. After all, the next guy to come along and read your code might see an empty DIV and be tempted to remove it because it contains no content. This way you can leave some nice little message pleading the proverbial programmer to leave well enough alone!
Here are a few little hints that may help speed up your SVN workflow if you are using SVN in a Linux environment. I found the first one on Snipplr and used that to create the second one for myself.
- Deleting multiple missing files (ie. the ones with a “!” next to them):
svn delete $( svn status | sed -e '/^!/!d' -e 's/^!//' )
- Adding multiple new files (ie. the ones with a “?” next to them):
svn add $( svn status | sed -e '/^?/!d' -e 's/^?//' )
I just pushed a new redesign for our corporate website CHG Healthcare and less than an hour later found out that the new pages that never existed before were already indexed by Google and were showing up in the rankings.
I had not yet added the new pages to my sitemap.xml. I had not yet created 301 redirects from the old content.
Not only that, but a quick look into Google’s Webmaster tools told me that the last time the spiders had been there was 4 days ago.
So how did Google know to index these new pages? My suspicion is Google Chrome. I suppose someone somewhere (probably those of us inside the company testing the pages) accessed the new site with Google Chrome and that somehow triggered Google’s indexing service to grab the new content. While this might seem a bit scary to the Chrome user, it makes my job a lot easier of getting new content indexed and I welcome the notion.
That is, assuming my hunch is correct. Anyone heard if Chrome is doing this? What about the Google Toolbar?
(Note: this post applies to Photoshop CS3 on a PC. I haven’t played with it on the Mac yet)
I’ve been frustrated for a long time with one simple thing in Photoshop CS3: the fact that ctrl+left-clicking an item in my layout with the move tool no longer selects the layer of the item I’m clicking, but the most top level folder that its layer resides in.
Well, today I finally figured out the new shortcut for selecting a layer from the layout. Using the move tool, hover over the object you want to select, then use alt+right-click. That will automatically select that layer in the Layers panel.
I guess I could use Alt+Shift+Ctrl+K and change the shortcuts around to what I’m already used to. But I might as well get used to the new one so that I don’t have to update it in future version installations, or if I’m on someone else’s machine I won’t get frustrated.
No matter how many Omniture Support people tell you that there is no limit on the number of characters you can use as your serial number when implementing Event Serialization, they are wrong!
The limit is 20 characters.
It took me 3 phone calls and a weeks worth of bad data to figure that out. It is no where to be found in their white papers either, so don’t bother looking there.