Re: cellpadding and cellspacing problem



Scripsit Travis Newbury:

On Apr 12, 8:02 am, "K." <halinaciern...@xxxxxxxxxxxxxx> wrote:

I created yet unfinished pagewww.slub.zmyslowski.pl about my
wedding.... I used validator before->http://www.htmlvalidator.com/.
-> my page is

Man I don't have an answer for you, but I have to give you kudos for
doing all the prerequisite work and giving us a URL and validating
your page first.

Well, almost giving us a URL (the http:// part is missing) and trying to validate. Unfortunately, he used a product that is dishonestly sold as a validator but isn't, the infamous "CSE HTML Validator". His confusion is understandable; the phoney validator's business isn't.

In reality, the page contains dozens of syntax errors, as a real validator like http://validator.w3.org would tell (for free). The page has a mixture of XHTML 1.0 and HTML 4.01 syntax, and contrary to the doctype declaration, it uses Transitional features. It should be fixed to comply with HTML 4.01 Transitional, then perhaps improved (by replacing presentational markup by CSS) to HTML 4.01 Strict.

The problem asked is independent of these problems. As Els writes in his reply, the gaps are caused "by the space that is below text and inline-images, to make room for descenders of letters like g,j,p,q,y". Setting display: block for the images is one way of fixing. Another option, perhaps more natural, is
img { vertical-align: bottom; }

Technically, the problem is that an image is treated as a special kind of text element, like a letter, which is by definition vertically aligned to the _baseline_ of text. You can see this if you put an image between letters, e.g. <p>yep<img ...>yep</p>.

This is what CSS specifications say, and Firefox obeys this, whereas IE doesn't. But this can fixed either by making the images blocks (as far as rendering is considered), which aren't treated as text elements, or by explicitly setting their vertical alignment to bottom (i.e., the bottom of the image is aligned to the bottom of the enclosing element's box).

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

.



Relevant Pages

  • Re: Are "include files" serach egine friendly and HTML/XHTML compliant?
    ... It's right, proper, and correct to make the doctype the first line in the ... as long as the rest of HTML codes are compliant with the ... job - I am more than happy to care for why HTLM Validator produce errors ... to favor doctype tag better. ...
    (microsoft.public.frontpage.programming)
  • Re: Massive HTML coding errors
    ... that a validator wouldn't comment on, ... The DTD at the top of your HTML code is invalid! ... those for your images, and a width of, say, 50% for the div that starts ... You need to be more careful when defining "font-family". ...
    (comp.infosystems.www.authoring.html)
  • Re: Massive HTML coding errors
    ... that a validator wouldn't comment on, ... The DTD at the top of your HTML code is invalid! ... those for your images, and a width of, say, 50% for the div that starts ... You need to be more careful when defining "font-family". ...
    (comp.infosystems.www.authoring.html)
  • Re: Are "include files" serach egine friendly and HTML/XHTML compliant?
    ... I am not sure but I think it has problem with ASP pages. ... done with it by removing all VBscript codes and test it again pure HTML ... Any unrendered ASP code will return an error in a validator - it must be ...
    (microsoft.public.frontpage.programming)
  • Re: Numeric character references in generated content
    ... content in CSS like I would do in HTML. ... What does the Validator say about your markup? ... iPhone, two column by default on the desktop, and three column layout on ... handle column-count but handles media query dynamically, ...
    (comp.infosystems.www.authoring.stylesheets)