Sign up or log in how to change xhtml to pdf customize your list. Join Stack Overflow to learn, share knowledge, and build your career.

I use strict xHTML 1. Is it possible to fix it with CSS only or I must change html markup?

Because DIV is not a self-closing element in either XHTML or HTML. The difference between is that in the first there is a non-breaking space character that fills up the DIV.

In the second there is nothing. That is why you will not see anything render on the second version. Also, XML and XHTML are not the same thing.

The latter borrows the convention of self-closing a tag if it’s not part of a matching pair. But from XML point of view this tag is completely valid. If you have nothing to render between the tags, nothing will render. XHTML: it’s a layout issue.

Its height is equal to the line-height property. It is an old IE5 bug that an empty div would still render with height as if it contained a line of text. DIV must have both starting and ending tags. Any tag can be self-closing in XHTML.

You’ve confused real XHTML with a compatibility hack that allows sending XHTML as HTML to old browsers. By posting your answer, you agree to the privacy policy and terms of service. Not the answer you’re looking for? Browse other questions tagged css xhtml-1.

Why don’t self-closing script tags work? Why not use tables for layout in HTML?

CSS to PDF with PHP? How to make div not larger than its contents?

CSS in xHTML strict 1. 0 without setting width and height in pixels? How do I respond when someone answers ‘Yes’ when I ask “Would anyone like the last ?

How to handle plagiarism on method that does not affect outcome results when reviewing a paper? Why does this rocket have a nose cone “cozy”? Do advanced musicians still practice scales every day?