-
Notifications
You must be signed in to change notification settings - Fork 92
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
Images not aligned to center when :align: center is specified #64
Comments
I played around and confirmed that other |
@bashtage I'd like to try to help out with this issue. Could you point me in the direction where this would be added/fixed? |
I was able to reproduce this on the demo site but updating ===================
Material for Sphinx
===================
.. image:: images/screenshot.png
:alt: Material for Sphinx Screenshots
:scale: 20%
:align: center
... Note that image is not aligned to center. Also |
Built example in case someone wants to manually inspect the output: |
I assume that there is no css for img.align-center or img.align-right. |
Thanks, where would the best place to add this be? |
Confirmed that the CSS was missing. I was able to temporarily work around this issue by including the following custom CSS in my Sphinx project: # conf.py
def setup(app) -> None:
app.add_css_file('css/custom.css') /* custom.css */
.align-center {
display: block;
margin-left: auto;
margin-right: auto;
} |
It appears that .. list-table:: Table
:header-rows: 1
:align: center
... |
If I create some RST like:
I noticed that unlike vanilla Sphinx the image is not aligned to the center of the page, and is still right justified instead.
.. image::
The text was updated successfully, but these errors were encountered: