Get dompdf

About dompdf

Documentation

Examples

Support

Please post bug reports & support questions to Google Groups.

On this page:

CSS 2.1 Compatibility

Selectors

dompdf supports the following CSS 2.1 selector syntaxes. dompdf also supports elements with multiple class attributes (e.g. <p class="red bold">foo</p> matches p.red and p.bold).

* yes
E yes
E F yes
E > F yes
E:first-child partial
E:link yes
E:visited N/A
E:active N/A
E:hover N/A
E:focus N/A
E:lang(c) no
E + F yes
E[foo] yes
E[foo="warning"] yes
E[foo~="warning"] yes
E[lang|="en"] yes
E.class yes
E#myid yes

Properties

dompdf supports the majority of CSS 2.1 properties. Some notable properties are not supported however. See the following table for details on which properties are supported.

background-attachment N/A
background-color yes
background-image yes
background-position yes
background-repeat yes
background yes
border-collapse yes
border-color yes
border-spacing yes
border-style yes
border-top yes
border-top-color yes
border-top-style yes
border-top-width yes
border-width yes
border yes
bottom no
caption-side no
clear no
clip no
color yes
content partial
counter-increment partial
counter-reset partial
cursor N/A
direction no
display partial [1]
empty-cells no
float no
font-family yes
font-size yes
font-style yes
font-variant no
font-weight yes
font yes
height yes
left no
letter-spacing no
line-height yes
list-style-image yes
list-style-position yes
list-style-type yes
list-style yes
margin-right yes
margin-top yes
margin yes
max-height yes
max-width yes
min-height yes
min-width yes
orphans yes
outline-color no
outline-style no
outline-width no
outline no
overflow partial
padding-top yes
padding yes
page-break-after yes
page-break-before yes
page-break-inside yes
position partial [2]
quotes no
right no
table-layout no
text-align yes
text-decoration yes
text-indent yes
text-transform yes
top no
unicode-bidi no
vertical-align yes
visibility no
white-space yes
widows no
width yes
word-spacing yes
z-index no

1. display types inline-block and run-in are not supported.

2. only static positioning is currently supported.