I’m using the zen theme (link). I’m trying to use the figure shortcode to center an image. It works in the desktop view, but it doesn’t work in the mobile view in chrome dev tools. When running hugo with --bind and viewing the site with my phone - the image is still not centered, so I don’t think it’s an issue with Chrome dev tools.
If it makes any difference, my website it in Hebrew, which is aligned right-to-left.
One additional find: When I set custom resolution, I found that up until 665px of width - centering the image isn’t working. But, from 666px and above centering does work.
This is CSS from the _zen.scss file, see below. You can copy it to your root asset dir and adjust as needed. Or just, add a blank _zen.scss to clear “zen” the styles completely. They just are some styles I tend to use often so have them included.
@chrillek : That makes perfect sense. Can you recommend such places?
(For context: This is my first time dealing with CSS, trying to build a website for my wife. I’ve spent most of my professional time working on very different areas.)
Frankly, I’d start without a theme. Giving you more control (or rather less code to wade through) and avoiding a technology stack that you don’t know (like the CSS preprocessor used here).
is full of CSS details, but not necessarily a good place to start learning it. You might want to check out MDN (Mozilla Developer Network) or simply throw “CSS tutorial” at your favorite search engine.
The Zen theme is the theme I use as a base for all my Hugo projects. It has the styles I personally want. The _zen.scss I almost always clear out on customers sites, they are for my private sites.
It is not ment to be used as it, it is very plain. It is built to be a good solid base to get on started when implementing a design for a site.