vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

absolute positioning is not applied to inline elements (e.g. span) #318

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create container div with a background image. absolute position it. Assign it 
a css class.
2.Add a few span tags inside the div. Each one has it's own id, tied to css 
properties in a separate file.
3.Attempt to position the spans inside the div.

What is the expected output? What do you see instead?
I expect to see the background image with the spans placed in it.
The image appears and so do the spans. However, no matter what I try to 
position them as I wish, they will not move. The only property that works is 
margin-left. I have tried margin-top and margin-bottom, top and left 
positioning with absolute, relative, fixed. All possible combinations. 
Margin-left will take it where I tell it, but every other properly is 
completely ignored.

What version of the product are you using? On what operating system?
Latest svn trunk download (July 6th, 2011). Mac OS X 10.5.8

Please provide any additional information below.

The container div with the background image is positioned absolute and it works 
fine.

Original issue reported on code.google.com by capoeiri...@gmail.com on 6 Jul 2011 at 4:14

GoogleCodeExporter commented 9 years ago
I believe your issue is due to the use of span tags for your inner positioned 
elements. DOMPDF does not current support positioning these unless you 
explicitly indicate they should be displayed as block elements. The other 
option would be to use div instead of span.

Check out the following example with the span elements correctly positioned:
http://eclecticgeek.com/dompdf/debug.php?identifier=cf83d74b5f94950812848adb97e9
c887

We'll have to look into the positioning problem a bit more to see if inline 
elements really need to have the display explicitly set to block. Safari 
positions the span elements even without this declaration. Perhaps DOMPDF 
should automatically switch to a block view for absolutely-positioned elements.

Original comment by eclecticgeek on 9 Jul 2011 at 3:08

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r498.

Original comment by fabien.menager on 21 Aug 2012 at 9:28

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16