SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Location
    England
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with DOCTYPE

    I'm fairly new to CSS and I'm trying to do a side bar for a site that will contain links.

    I've used the following CSS code

    div.side { position: absolute; top: 180px; left: 0; width: 145px; height: 100%; padding-top: 0.5em; margin-left: 0.6em; background: #484848 url(side.gif); }

    I want the bar to display to the bottom of the page no matter how many links are in it.
    When I use

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">

    the bar only displays as far down as the links go (ie. to the bottom of the last link).

    If I use just

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    it goes all the way down no matter how many links there are.

    Am I right in thinking that using the second DOCTYPE basically make Internet Explorer 6 behave like Internet Explorer 5?

    How would I be able to make the sidebar go all the way down using the first DOCTYPE?

    Cheers.

  2. #2
    SitePoint Guru nagrom's Avatar
    Join Date
    Jul 2001
    Location
    Western CT, USA
    Posts
    803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    % values don't work with height (at least not for me)

    as to your doctype question, check out this a list apart article: http://www.alistapart.com/stories/doctype/index.html

    to quote:
    'Using an incomplete or outdated DOCTYPE—or no DOCTYPE at all—throws these same browsers into "Quirks" mode, where the browser assumes you’ve written old-fashioned, invalid markup and code per the depressing industry norms of the late 1990s.'


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
  •