Advice on marketing, business strategy and of course info on factor1 projects.

Discovery: CSS Div ID naming issues

CSS,Discovery,Research — Posted by: matt adams on April 9, 2008 at 12:08 pm

Warning: This is a technical, website coding post. Not really marketing related.

So I was coding a site today while waiting at the dentist office (I am a geek I know). And I decided I would name one of my Div IDs “960wrapper”, to indicate that this div was 960px wide. Makes sense right? After doing this, and some other code the issue arises. My html is not seeing this div. at all.

I added a border stroke to outline it
nothing.

I added a background color, and a min-height.
still nothing.

Keep in mind I have no internet, since I’m in a waiting room. So no google searches, no CSS xray tool.

I am about to pull my short hair out.

In some playing, tweaking, and overall trying to do anything to make this simple div wrapper to work, I re-title it to just “wrapper”

And BAM it works. I think I let out a little victorious battle cry in midst of the dentist office.

So what I figured out:
Div ID’s seem to not like names starting with numbers.

I did a few google searches back at the office. Nothing. I cant find anything related to this issue. Can any web CSS geeks point me to where I can learn why this method wont work?

3 Comments »

  1. This may help:
    http://www.maxdesign.com.au/2008/04/10/naming-ids-with-numbers/

    Comment by Russ Weakley — April 9, 2008 @ 1:47 pm
  2. Thanks Russ. Great find.

    http://www.w3.org/TR/html4/types.html#type-name

    Tells me the official word.

    I still find it odd that an ID must begin with a letter.

    Comment by matt — April 9, 2008 @ 3:45 pm
  3. I’ve had the same problem before, but I’ve nver seen the official ruling. I’m glad you figured it out to get the site working. CSS is weird and kind of buggy. It is a great tool, but a frusterting one at times.

    Comment by Amy — July 25, 2008 @ 7:01 am

RSS feed for comments on this post. TrackBack URI

Leave a comment