Annoying things I’ve noted.

Posted in development by Kris Gray on March 28th, 2008

Brain dump time.

  • Using a strict XHTML doc type in IE 6, a DIV can only be as small as its line height and font size are defined as.
  1. DIV {
  2.  
  3. height: 2px;
  4.  
  5. width: 2px;
  6.  
  7. line-height: 2px;
  8.  
  9. font-size: 2px;
  10.  
  11. }
  • A little random, but if your setting up a Fitnesse test suite, and have a .NET config file, you need to make your config file the same name as the fitnesse server config. This is because your process runs inside the Fitnesse executable and its going to search for its config file for your settings. (I think its fitnesse.exe.config) I didn’t see this on the internet anywhere, so I thought I’d mention it.
  • I dislike the AlphaImageLoader IE 6 filter. Its nice that its there, otherwise PNG’s would still be mostly pointless, but the limitations it provides are disgusting. (A post for another time)
  • If you’ve never worked in a design studio before, your missing out on the gamut from eccentric to mundane. Positioning fonts pixel perfectly was never a concern of mine considering the imperfection of CSS, and the display of web pages across different platforms. (Different monitors, different browsers, different tubes between the computers)
  • CSS and Semantic architecture doesn’t get enough lip service. This is one hard thing to do to get your HTML to be nice and semantic so that it your CSS can cascade across the entire site properly and without massive CSS hacky things.
  • I hadn’t used the CSS syntax of .class.class to match elements before and now I know why. It doesn’t work in IE 6, which can make this a really big problem if you were relying on it for some reason. (Don’t ask).  This selector which reads as, “class that has class”matches things like, “box red show”, so if you had .box.blue no workie, but .box.show would work just fine.
    • We had some HTML that went, class=”module news”, and when I went to change all the H2’s in the news section only, IE 6 barfed. Led to some icky CSS.
No comments

Quick and easy IE only CSS

Posted in development by Kris Gray on March 28th, 2008

I remember from watching a video on the YUI Theater by Nate Koechley on the YUI CSS Foundain library and heard a sweet little trick to write CSS comments for IE only without using conditional comments.

His trick was to just append an asterisk (*) to the beginning of any command that you want to be IE only.

  1. #Box {
  2.  
  3. min-height: 500px;
  4.  
  5. max-height: 1000px;
  6.  
  7. height: 600px;
  8.  
  9. *height: 500px;
  10.  
  11. }

Just remember to do your IE only command after the firefox command.  If you switched the two heights, IE would still read both and set its height to 600px.

1 comment