Skip to content
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

image alignment is off #61

Closed
svenXY opened this issue Oct 1, 2020 · 2 comments
Closed

image alignment is off #61

svenXY opened this issue Oct 1, 2020 · 2 comments
Labels

Comments

@svenXY
Copy link

svenXY commented Oct 1, 2020

Hi & thanks for the nice theme.

I have a static page (in content/pages) that works fine, but I want to display a small image between two paragraphs. I'd like it to be either left-aligned or centered. Centering does not seem to work at all and if I just normally add the image like this:

I'm Sven, |my_img|
bla bla bla

.. |my_img| image:: {static}/images/me.jpg
  :alt: Me
  :width: 100px

the left-aligning of the image is off to the left, because of this:

.post-content img, .post-content .fluid-width-video-wrapper {
    max-width: none;
    width: 110%;
    margin-left: -5%;
}

Removing the margin-left line in the developer tools fixes the problem, but I assume you put it there for a reason?

Do I have other possibilities to make sure the image is displayed correctly?

Thanks a bunch,
Sven

@svenXY svenXY changed the title image in static page is off image alignment is off Oct 1, 2020
@sio
Copy link
Contributor

sio commented Apr 16, 2021

Yeah, it's some artistic decision I do not agree with :) I think it's added to make image area slightly wider than the text column.

I'm using CSS_OVERRIDE to disable this:

/* Do not scale images up */
.post-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@svenXY
Copy link
Author

svenXY commented Apr 16, 2021

thank for the solution with CSS_OVERRIDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants