Skip to content

Instantly share code, notes, and snippets.

@mamiu
Last active May 18, 2016 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamiu/aa00d0f7d5ad135e0a5ab72ab26d620d to your computer and use it in GitHub Desktop.
Save mamiu/aa00d0f7d5ad135e0a5ab72ab26d620d to your computer and use it in GitHub Desktop.
Image caption for an Odoo image gallery. Add an inline caption to a image in an image gallery.
Website assets:
<style>
.image-caption {
background-color: #000;
opacity: 0.7;
position: absolute;
width: 600px;
padding: 8px 10px;
left: 50%;
margin-left: -300px;
bottom: 77px;
}
.image-caption p {
margin: 0;
font-size: medium;
color: #fff;
}
</style>
In the image gallery after the <img>-tag:
<section class="image-caption">
<p>Das ist die Bildunterschrift</p>
</section>
@mamiu
Copy link
Author

mamiu commented May 18, 2016

You only have to edit the width in the <style>-tags according to the width of your images, the margin-left to the half of your width and the bottom (there you have to try).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment