diff --git a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
index 368a4c60..82b149e7 100644
--- a/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
+++ b/lib/Epub/Epub/parsers/ChapterHtmlSlimParser.cpp
@@ -577,7 +577,12 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
self->startNewTextBlock(self->currentTextBlock->getBlockStyle());
} else {
self->currentCssStyle = cssStyle;
- self->startNewTextBlock(userAlignmentBlockStyle);
+ auto blockStyle = userAlignmentBlockStyle;
+ if (self->embeddedStyle && cssStyle.hasTextAlign()) {
+ blockStyle.alignment = cssStyle.textAlign;
+ blockStyle.textAlignDefined = true;
+ }
+ self->startNewTextBlock(blockStyle);
self->updateEffectiveInlineStyle();
if (strcmp(name, "li") == 0) {