Archive for August, 2007

z-index in IE

Monday, August 27th, 2007

I ran into an issue in IE a couple months back & I’ve seen a couple of other people mention they’re having the same issue. It’s something that once you’ve solved in a project you usually don’t think about it again… at least until you run into the problem again in a different project.

From what I can tell this isn’t always an issue, just happens when certain conditions are met (& I’ve not completely figured out what all of them are). Usually the person sees what they expect in Firefox, Opera, & Safari, but the bottom of their “popup” is disappearing in IE. This happens a lot with drop down menus (bad for useability, but clients think they’re nifty!) & anything else where using the CSS z-index would fix it… if z-index worked correctly in IE.

Please note - This has nothing to do with the annoyance of certain form elements appearing above everything no matter what you do (in this case you have to set visibility on those form elements to hidden & then reshow them later).

Also note - I don’t know if this applies to IE7 or not.

typical 3-part page layout with header, body, & footer I dislike using it as an example, but it’s an example everybody is familiar with whether they like them or not. Let’s say you have a simple 3 division layout (#header, #body, & #footer). In the #header you have a drop down menu that, when displayed correctly, should appear in the z-index layer above everything in #body. As long as you set the z-index higher than everything in #body this should work fine in Firefox, Opera, & Safari.

Like I said, I’m not sure at which point IE breaks & appears to cut off the bottom of the menu. It could be because some item in #body is floated or perhaps even if #body itself is floated. Whatever the actual cause, it seems as though you can’t get the layer you’re trying to effect to do anything correctly.

I believe that IE is having issues in setting default values for it’s own internal z-index if you will. Typically as a browser parses through HTML it automatically layers stuff that comes last over the top of stuff that came first. This is the correct default behavior of browsers. Unfortunately it seems IE carries it a bit to far.

Layers

IE appears to create containers & z-index only applies to elements at equal levels within that container. So even though you set a z-index of 500 on that drop down menu, that z-index of 500 only applies to items within the #header container & doesn’t apply to any elements within the #body container. Talk about frustrating…

So what’s the solution I came up with? In your CSS for IE you need to reorder the z-index sequence for IE…

#header {
	z-index: 3;
}

#body {
	z-index: 2;
}

#footer {
	z-index: 1;
}

This should force IE to reposition the #header container above the other container layers as well as forcing #body container above the #footer container. It’s a dirty hack imo so don’t use it unless you have to.

  • Share/Save/Bookmark

Eclipse 3.3.0 - Europa (plus plugins!)

Tuesday, August 21st, 2007

Way back in April I made a post about the IDEs I’ve been stuck with at work - Dreamweaver 8 & PHPEdit. I ended up using Dreamweaver, but remained frustrated with several issues.

In May at the Tulsa PHP User Group meeting, somebody showed off EasyEclipse and mentioned how easy it was to get it working. I ended up downloading & installing the EasyEclipse for LAMP to see what it was like.


I have to say that I had heard about Eclipse back in ‘03 when I had been working at Blue Cross & Blue Shield of Kansas City. 1 of the Java developers had mentioned it as a great IDE for Java. I had messed around with it some then & found it was great for Java Development… However, most of what I do is web development & most of that is in PHP. Eclipse had tons of plugins even back then. I found PHPEclipse & thought it’d be great for using in my PHP development so I downloaded it & attempted to install it in Eclipse. I ended up with a bunch of problems so read through the documentation. Apparently it only worked well with a specific version of Eclipse & specific versions of other plugins… I began the hunt for the various versions of the plugins it depended on because… how hard could it be?

I ended up giving up after going through dependency hell… This version of this plugin requires that version of this other plugin… If I could even match what this project called the plugin versus what that project called the same plugin & could even find the specific version required… I gave up… That was around late ‘03 or maybe early ‘04.


Considering the dependency hell I had previously gone through you can understand I was excited about EasyEclipse. Unfortunately the project I’m working on both depends on a particular libary & has a sandbox with developer test files… Both of these have PHP code that causes a lot of Eclipse warnings about variables not being initiated & included files not being found. I wanted to filter the warnings based on directory, but couldn’t figure out how to do this. I found the irc server & channel that both Eclipse & PHPEclipse use (irc Eclipse channel & irc PHPEclipse channel), popped in for a bit, & asked my question.

Apparently you can’t filter by location :( I did figure out that I could make each major directory in the project it’s own project & then open/close projects as I needed. This keeps the number of problems to a minimum & makes it easier to manage them… No more 3rd party libraries & programmer test code issues flooding the problems pane.

I ended up with a couple of other questions & after 1 in particular somebody asked me which version of PHPEclipse I was using. Now I don’t remember… it was whichever version that EasyEclipse for LAMP had at the time. I was informed I should update to the Nightly & this sent shivers through me… I knew there were issues with updating the plugins in EasyEclipse & the other problem was the PHPEclipse Nightly worked best (only works with?) Eclipse 3.3. I thought this might flop into another dependency hell, but after being assured things should go well I went for it.

I have to say that the changes in Eclipse 3.3.0 Europa are amazing. Considering I liked what I had seen in EasyEclipse I wanted to use all the plugins in Eclipse 3.3 as well. I went over to the EasyEclipse website, going through the list of installed plugins - I went to the about page for all of them. If the project page wasn’t listed I googled for it. Most of the plugins simply required me to add them to Eclipse via Help -> Software Updates -> Find & Install… wizard. Only a few had dependencies that I had to google for, but those were pretty much the same way… adding via the Software Updates’ Find & Install wizard. A few of the plugins were a bit more annoying & required me to download the plugin & then -

  • dump it into the plugins directory
  • unzip it into the plugins (& possibly the features) directory
  • unzip it somewhere else on my computer & then use the Software Updates’ Find & Install wizard

Once I got that done I went searching for the Aptana plugin. I figured this might cause me issues as well, but luckily it was a breeze to install.

I have all the plugins I currently want installed… Now what? Configuration! Everybody wants different settings for different things. Eclipse & the various plugins (or at least the ones I’m using regularly) are very easy to modify through the preferences window.

One thing to be aware of however is that alot of the plugins utilize the built in Text Editor. This caused some issues for me because I prefer a tab character (1 byte) versus using 2, 4, or 8 spaces (2, 4, or 8 bytes) in my development files. I can switch to using spaces, but when I have a choice, I prefer a tab… it also makes conversion between 2 & 4 spaces (or any other conversion) much easier. Unfortunately this causes an issue when multiple file types use the default Text Editor.

YAML files have no clue what to do with tab characters. They require spaces for indentation. I don’t know who defined the specs for YAML, but that’s just annoying. Currently I’ve not been able to find any plugins for YAML & even if I do it will probably use the default Text Editor. This is currently causing me a problem because I have a choice of either A) constantly go into preferences & change how tabs are handled when I switch between YAML files & every other file type or B) use an external editor for YAML. I’ve gone with option B.

I’m using TextPad 4 on windows which allows me to define my own document types & specify what syntax highlighting I want, what kind of tabulation (& how large) is needed, whether to default to Win or Unix line endings, & what character set (utf-8, iso-8859-1, etc) I want to save files as… Per document type!

My preference on Linux is Kate, but I’ve not gotten around to setting Kate up to handle YAML files so I’m not sure I can do the same - I hope I can.

Currently I have Eclipse set up pretty much the way I want it. The major plugins I’m getting alot of use out of include PHPEclipse, Aptana, Amateras, Subclipse, AnyEdit, Web Tools Platform, & Eclipse Tidy. I also have some others that I’ve not gotten to consciously use yet including a DB tool.

  • Share/Save/Bookmark

Email Filtering/Sensoring & Job Searching

Wednesday, August 8th, 2007

Or why I almost didn’t get my questions answered…

Last week thursday I was told that if I found another project to go ahead & take it. For those that need interpretation that means - if I find a job elsewhere, go for it… no need for 2 weeks notice. At least I’m still showing up in the morning, leaving in the evening, & getting paid so the project hasn’t reached a, Please pack up your stuff & leave, point.

Last week friday I received a call from somebody looking for PHP developers in the Kansas City (KC) area. I was born in KC, grew up in KC, went to school in KC, & done alot of work in KC… I like KC - it’s a large landmass, small population metropolitan area. It consists of something like 25 towns & cities, 3 or 4 counties, & sits on the border of 2 states.

I was interested… I just wanted to check financials (moving expenses not paid) before I said yes. I got home that night, check & sent an email off with an affirmative that I could move, but I’d need to modify my initial payrate. I also included a couple of questions -

  • Do you know what the dress code is? casual, biz casual, or biz dress?
  • Do you know if the project will allow flex time or even be just flexible with time? Or controlled by a time nazi?
  • Do you know what part of town I’ll be working in?

I sent the email, did other stuff, went to bed, & woke up on saturday. I did not expect to see an email from my contact asking me why I hadn’t sent him an email yet. However I just figured it might be an issue with their server as he had stated on friday that they had been having some problems…. I forwarded a copy of friday’s email on saturday with a sorry you didn’t get this message.

Sunday evening I had finished several calculations & figured out what I needed as a payrate. I hit reply-all to the email I had sent on saturday & included my payrate and another question.

Monday I hadn’t heard anything so I gave him a call, but got voice mail. He left me a voicemail stating he hadn’t received any emails & was wondering what was going on.

That’s when I realized that Cox cable could be the culprit… When connected to the Cox network you have to send normal email (i.e. via Outlook or Thunderbird) using their SMTP server - which just happens to be (or at least in Tulsa, OK) listed multiple times on a couple of well maintained known spam server lists (Yes, I have notified them of this & long story short, I got a stupid answer). Anywhere else I can use my webhost’s mail server to send email & never have to mess with the ISP’s mail server.

To get around this I logged into my webmail interface & used forward as attachment & sent the email (this time it would completely bypass Cox & as a bonus would also have the @domain match the originating mail server). Monday night I went to bed confident that this would solve the issue.

Tuesday I got nothing. I called to see if he had received the email yet. He hadn’t. I knew it wasn’t an issue on my end cause I can send & receive emails no problem… I had just received 3 spam emails right before he asked if my mail server was having issues. Only thing I could think of was his mail server might be blocking my mail server for some reason…

Tuesday night I sent a This is a test email to him, via google mail, stating that I’ll follow up with another email. I copy/paste the entirety of the last email I attempted to send him over the weekend into another google email. This has the entire history of what he sent me & what I sent him in it. I send that to him & figure I should at least get something back or there’s something seriously wrong with his email server.

Wednesday I get a reply to my This is a test email asking, Did you send that other email? Ugh, what now? Could it be that I have something in the email that could possibly be caught by a spam filter & diverting it into his spam box? Could it be that the email is to long &/or has to many duplicate references & is being caught by a spam filter? At this point I’m almost tempted to simply post it as a page on my web server & say go here, but that’s not really user friendly & may seem to say I don’t know how to use email

I figure I’ll give it 1 more try… This time I’m not going to send any of the history. I’m not going to elaborate on any questions. I’m just going to make it short, changing ‘biz’ for ‘business’, & hope this short, hacked up version of my email will make it through.

My detailed scrutiny made me see the phrase time nazi.

Considering some of the kid friendly sensoring crap I’ve gone through in the past I realize certain words may cause squeamish people problems. I understand why some people want to filter certain words (universal cuss words for example)… I’m not even saying it’s what the problem was… All I know is after removing the entire email history, changing ‘biz’ to ‘business’, & changing ‘time nazi’ to ‘time control freak’ - the email went through just fine & he replied back that he had received my email.

My guess is that his mail server not only filters for spam, but also kills off emails containing sensored words & 1 of those words is ‘nazi’. Please… if you’re setting up a server that kills emails based on sensored words… would you please, please, please set the server up to reply to the sender telling the sender why you are rejecting the email.

Considering this & the fact that …controlled by a time control freak just sounds overly redundant I asked around… I got several suggestions, but none seemed to embody the iron fisted evilness of ‘time nazi’[1].

  • time freak
  • time fascist
  • NTP whore (it’s good, but normals wouldn’t understand)

Somebody did meantion ‘time zealot’… While not necessarily embodying the iron fisted part I think it does a good job with fanatical… With a synonym like extremist I think it fits well.


Why did I even bother to include such a thing in a question about a job & what exactly do I mean by a ‘time nazi’… er, a ‘time zealot’?

I ended up with a job where I showed up 10-15 minutes early every day, went home for lunch, & left 10-15 minutes late. I had to clock in & clock out so anybody who needed to could see my time. After a week of me working there the ‘time zealot’ couldn’t take it anymore & turned me in for stealing company time… I had been taking 1-7 minutes longer on my lunch break than I should have been.

Considering most of the jobs I’ve had since then… once I get going I usually end up showing up somewhere between 10 til & 10 after I’m supposed to be there, work through lunch (usually an hour), & leave about 10-15 minutes late. This possible 10 minutes late in the morning apparently drives ‘time zealots’ bonkers.

Don’t get me wrong. There are situations that are very time sensative. A retail store & assembly line are 2 that I can think of off the top of my head. With retail you need to get there before the store opens or you have issues. In an assembly line if somebody is missing for 10 minutes it can cause some serious problems.

I used to be very time conscious. I wore a watch & watched it constantly. I’ve mellowed over the years… I discovered I spent more time watching the watch than accomplishing anything & let’s face it… Life happens, get over it. I no longer wear a watch.

I’ve also discovered that if I’m more worried about showing up on time I end up forgetting things. I’d rather take an extra minute or 2 to make sure I have everything I need… Showing up & realizing you forgot your (lunch, phone, presentation, security badge, whatever else you’ve forgotten at least once) is not fun™.

Because of the aforementioned issues & the fact that I don’t like arguing over something this trivial I prefer to ask in advance. I’d rather defuse the issue ahead of time instead of getting stuck in a situation where I have to deal with a ‘time zealot’ again.


[1] Please note that I’m not trying to state that ‘time nazi’s are anywhere near the level of evil that the Nazi’s from WW2 excelled at. Nor am I trying to lessen the vile deeds done by the Nazi’s of WW2.

  • Share/Save/Bookmark