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
Large images dangling off screen #1099
Comments
|
After a bit of fiddling, it apparently has something to do with |
|
I fixed this with |
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It does work. Thank you!
But what do you mean that it doesn't work when w/h is set as a percentage?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJU+HTqAAoJEFwU9ymJ941myrQP/0E7hLjaebyiPsxFljkQDqvL
TtpEbXnL95utl/P7ep2Dj2BSSsjKuhM6MrCoygR3SR4wwtPBntsiWFbbZ19GDAFC
W0E6NB05rV6LyOtz5twSQgTcGh5HzKc5zmGr0k2mLH9euvpRZ9TgWiCeoyEhX91l
c0x0KbK326rmoCFzNSXLn0wFrd2dHmVMer3uMzXbtFi+zcXmxZSlauVrJ7lmgevw
ByN38zeA95ysXI8t9bYmwEoIn9Rlzfvc9kZ0rvdXOlMQNZ5WoFF5aewZUV6P5t35
KAG9g7+N32tdsV2Di/fHXB5VWRBC+ccdThUIwqwhnHBJlI0FQZcOTXWWqRClh8h5
Wt8lRCMQPjtZ/Fh0Wv6I6nZ0HHs/asfQfatxJ60fG9LmiuFIV/3VDt1XBaz7Rx2D
qkPrlxKX9lVVTJGQfySAjT86W4LO6fDRdHXrRO3XllZqjtUW4WDav7GlntFOztcU
PS4P8myuCQKlCUgSw1XOXRJfL3ReTA/vdSJmUEbDHgMKZbPQpgztZt888Rg0wgcy
kTomFllW+KvlHzth1eHeMSe1IyG0+nE4LTXTDpCM1BaI+OwecupUxbYVisfJQ+J2
wK/8NxIE6tBARcBzlCpFiceSswdUnNdav9DEuAxH0F5PhWQYCd4dsN4Ir8S+TYHs
Y5tAYmoaPRN9l+hUGrtO
=JS1C
-----END PGP SIGNATURE-----
|
|
The images didn't fill the screen correctly (can't remember if they were too large or too small). |
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It makes sense now. Adding class="stretch" makes image dimensions change on the fly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJU/pWRAAoJEFwU9ymJ941mclUP/izK1nwW5b1tfmtEu1qzRPu4
TzkxZVauGTGpGriOBBIMqUTKR2i54Rh4xWoLjYE8gV/Y16kF1l/Fyb3tFDhKj+rn
7D/SnLnxZiwQSJQpePZEr+CTo/ZSoc2hnXmAr05ZubO1fxyFyd3fT8EZOYFDtmdX
li90n+++X5Mtp7lkzR5sIS1j4SB44ewj1FYEiYJFN9POGqD7ua3ysridJZzr5vMx
ZuyVxWAjX0TJD1a3pDHiCqX4spymEvonZEOfAfeYuZj6G/pOQTCQCstuMA0rgyr7
P73Kl4HASqRd3SXlNtahVfQ2K9dSca90Hl/kik3dR4+xuBwf4hj62UaiUB2J4a/a
0YqURV+/NmNjFHcDaOp+mAPIUC4NZOf9ibaHcev06nRqkljXNcXnSMoEAEBTXs65
PSjZkwZad0gKnUS8PtK0OHqlKhypnOCiSOZBl/ErcmqhSOR2wor1o14I2agk3neI
WYiDN1qYjKbGgTe8UFL2TsnjU2KRA4Zks9N9NFpwV2c5UjrmfcLcnrfdFwNsgEnj
R++PGs0O5MXRuAx8lVIf7QAhI2evrZaOj4nI5KeXx/5oXgJMTf40wMAd5McJCC9u
X2UrmdJDXvqAtA8xXN0mdn60bmQkv0YSzbLHvW3zNvncYg0NNNM4tthT/HMDFtSb
F4a2EfLHJLgrhiEov5JR
=LlxP
-----END PGP SIGNATURE-----
|
|
I could resolve this issue by adding this css: .reveal section.img_container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.reveal section img {
display: block;
margin: auto;
height: auto;
max-height: 100%;
width: auto;
max-width: 100%;
}and by adding I don't know if this is a good solution... |
|
class="stretch" seems to only work at first section in a group of vertical sections. |
|
I hit the same problem with a large square image, with or without class="stretch". The image is placed in a section just after a vertical of tree sections. |
|
I had the same problem and could solve it by: .reveal.reveal img
{
border: none;
box-shadow: none;
max-height: calc(66vh);
max-width: calc(66vw);
} |
|
Here's what I ended up with in my scss file (see #2127). It creates a format in which figures are expanded to full screen and their captions are invisible until hovered over. I use it for classroom lectures in which I frequently want to show just an image: |
|
If using Markdown to render images, even adding the CSS like so: isn't enough because when rendered, the Markdown renderer adds a Getting rid of the surrounding |
|
I ran into the same problem @davidjb describes, and I solved it by just putting HTML in my markdown. It's gross, but appears to be working. |
|
also affects me. For jupyter nbconvert everything fails, the image generated by matplotlib cannot use any styling |
I'm a newbie in reveal.js. Where exactly shall I save this code? I am using Jupyter Notebook to create slides, but the images are out of bound. |
I could only solve it with this hotfix at the end of a presentation html, which removes the wrapping Would be helpful, if it would be part of reveal.js, or am I wrong? |
|
Is there a proper fix for this that makes images fit, even for Markdown image links? |
|
I don't know it sth. changed in the meantime, but for me the following solution does the trick using a separate .md-file: I've put the HTML comment section below the markdown link. Then the auto adjustment of Stretch applies to the p-tag, which is always wrapped around. As the image within that p-tag is responsive by default it's getting resized. And finally my text below the image is visible ;) |
|
On Wed, May 17, 2023 at 4:41 AM Moritz ***@***.***> wrote:
Came across this thread facing the same problem.
I don't know it sth. changed in the meantime, but for me the following
solution does the trick in a separate .md-file:
`
[image: book in library] <http://assets/introduction/image1.jpg>
Some more descriptive text below the image
`
I've put the HTML comment section below the markdown link. Then the auto
adjustment of *Stretch* applies to the p-tag, which is always wrapped
around. As the image within that p-tag is responsive by default it's
getting resized. And finally my text below the image is visible ;)
—
Reply to this email directly, view it on GitHub
<#1099 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHYCJ76CILN6SHS6E36KNY3XGSMOLANCNFSM4A2DVKWA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Sent from Gmail Mobile
|
|
@jaegermoritz 's comment works. Example Markdown slide: |
openSUSE 13.2 x86_64 3.16.7-7-desktop
tested on Firefox 34.0.5, Chromium 39.0.2171.65
working on Konqueror 4.14.3
Large-ish images are rendered with bottom part off screen. Current resolution is 1600x900. Portrait orientations seem to work properly.
This is the image used

Screenshot in FF 34

Same slide in Konqueror (WebKit based?)

The text was updated successfully, but these errors were encountered: