SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Possible to do this with a doctype of 4.01 Transitional?

    Hey all,

    My design guy is on vacation and I need something done real quick that has me stumped ...

    Basically I need a CSS/javascript drop-down menu exactly like what you can find on the digg.com homepage where it says "Most Recent" and "All Stories".

    The only gotcha is that it has to work in all modern browsers with a "4.01 Transitional" doctype declaration. Long story - don't even ask. It's ugly.

    I've tried several different ways, but generally speaking I can't get it to look good in IE while looking good in all the rest too. I guess my first question is, is this even possible with an "old" doctype like 4.01 Transitional? If I change it to something more modern I can get it to work, but it ruins the rest of the entire page (and can't easily/quickly be fixed)

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    The doctype shouldn't really have much (if anything) to do with it. I haven't seen the change of a doctype break a page (unless there was no doctype at all previously).

    Could you provide a link to the page?

    PS: wlecome to SitePoint.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dsiomtw View Post
    I guess my first question is, is this even possible with an "old" doctype like 4.01 Transitional?
    Yes it is and can all be done using just html and css. No need for javacript in this case.

    Post the html and css you have so far.

    The doctype shouldn't matter.

    What are you calling "something more modern" in terms of doctypes?

  4. #4
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies. Here's an example of what I mean...

    http://www.imtoday.com/test/1.html

    This first one has the doctype below and doesn't work properly in IE:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    If you change the doctype to the below, or anything else more "modern" such as XHTML 1.0 etc. it works fine in IE but totally screws up the rest of the page. Long story short I just took over the site and the entire thing relies on a doctype of 4.01 Transitional to look right. It was built by someone who knows less about CSS than I do!

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    http://www.imtoday.com/test/2.html

    I've tried several other CSS-only as well as CSS+JS solutions I found, but the result is pretty much the same with them all - with this doctype they never work right in IE (I'm testing in IE 8 on Win XP)

  5. #5
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, but the main problem saying something like

    My design guy is on vacation and I need something done real quick that has me stumped
    suggests that if it genuinely is urgent, you most probably have posted the same request for help on multiple websites.

    I'm in the middle of helping someone else atm so I'll have a look at those links later if no-one else provides you with a solution.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    The doctype you are using currently is not really compete anyway, so I'm not sure if that is part of the problem or not.

    But the page has a huge number of validation errors, so that will surely affect page rendering to some extent. To be honest, I'd say the page needs to be rebuilt from scratch.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  7. #7
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by webdev1958 View Post
    ok, but the main problem saying something like

    suggests that if it genuinely is urgent, you most probably have posted the same request for help on multiple websites.

    I'm in the middle of helping someone else atm so I'll have a look at those links later if no-one else provides you with a solution.
    Thanks. It's not THAT urgent as in this minute - I haven't posted anywhere else.

  8. #8
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    The doctype you are using currently is not really compete anyway, so I'm not sure if that is part of the problem or not.

    But the page has a huge number of validation errors, so that will surely affect page rendering to some extent. To be honest, I'd say the page needs to be rebuilt from scratch.
    Just to make sure we're on the same page, which page has a huge number of validation errors? Are you referring to http://www.imtoday.com/test/1.html ? I just grabbed that from purecssmenu.com to use as an example of the problem I'm having. It has very little HTML really. The W3C markup validator reports the same 9 errors and 38 warnings for both 1.html and 2.html - but 2 works in IE and 1 doesn't.

    OK so I guess the next question is, can I get the above page to work properly in IE with the incomplete doctype of:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    This is the doctype that is used on every page of the site, and changing it in any way, even just adding the "http://www.w3.org/TR/html4/loose.dtd", completely screws up the layout of every page. I do need to have the entire thing rebuilt but that will take awhile ...

    On a related note, where's the best place to just hire someone to do a tiny job like this? Would the marketplace be appropriate? I need to learn this "stuff" myself eventually but at this point I'd rather just pay someone to code this up for me.

    Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •