SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jun 2010
    Location
    Canada
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trying to eliminate 1px horizontal whitespace after changing doctypes

    When I changed from doctype 4.01 transitional to strict, I get an extra horizontal whitespace at the bottom of my header before the navbar. Any ideas how to correct? Examples below. My imgs have a 1px white border to make it look like 'header_good.html' below Thx.

    http://173.201.24.200/test/header_bad.html (using strict doctype)

    http://173.201.24.200/test/header_good.html (using transitional doctype)

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,683
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    The gap you're seeing is the room on a line of text that's reserved for text descenders, such as j, g and y. The images are aligned with the baseline of the text, which is above the descenders. you instead need the images to be aligned with the bottom of the text area.

    Code css:
    table img {
        vertical-align: bottom;
    }
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Jun 2010
    Location
    Canada
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Worked perfectly, 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
  •