New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble aligning children to bottom #1961
Comments
There are definitely some vertical-alignment / line-height calculation issues we need to deal with. I was sort of able to get things to line up by specifying a height on the container
But it wasn't quite working. Maybe with a bit more work in that direction you could make it work? |
Thank you for taking a look. I'll keep tweaking the css. |
need to look at this in relation to #2762, which appears to render the bars at the top of the cell regardless of alignment |
Things are definitely improved in the upcoming release, though tables still present some problems. Attached is the output from a render with 1.1.0 and 1.2.0 using the following test HTML. testing document
|
wow, thank you, i was able to achieve vertical-align: middle! i wouldn't expect that the behavior of td on table tag would be vertical-align:middle by default. who would even guess that? thanks again! |
I tried the testing document with v2.0.7 and I feel like the problem got worse again. |
I'm trying to display a bar graph using multi colored
div
s in a table. The problem is that table cell content doesn't align to the bottom of the cell.HTML:
Notes:
.barContainer
height
is styled inline because it is configurable.margin-left
on each.bar0
is styled inline becausetext-align: center
appears to only affect text nodes (potentially a separate issue).This is calculated when the table is created.
CSS:
The browser renders:
dompdf renders:
If
vertical-align: bottom;
is applied totd
s:if
vertical-align: bottom;
is applied todiv
s:if
vertical-align: bottom;
is applied totd
s anddiv
s:if
vertical-align: bottom;
is not applied andmargin-top
is added, calculated not to exceed the height of.barContainer
as suggested in issue #672 :I tried changing the table elements to
div
s and the alignment issue persisted.If there's a workaround that I overlooked or haven't thought of I would appreciate some direction.
Thank you for taking the time to look this over.
The text was updated successfully, but these errors were encountered: