Page 1 of 1

CSS formating title and subtitle in header

Posted: 03 Jul 2023, 15:37
by trpgforum
Hello Karl
I spent the past few days creating the page https://www.thomas-ruf.ch/ausstellung/ for my photo exhibition. But I can't use CSS to make the red sticker in the header image narrower on the side. As a crack I admire, do you have any ideas? Only if it doesn't cost you too much time. Otherwise I live with it...

Thanks and best regards
Thomas

Re: CSS formating title and subtitle in header

Posted: 03 Jul 2023, 22:19
by mjau-mjau
The text in the intro is "block-level", which means it spans as wide as it's container (minus margin). You can change it do "display: inline-block", but you need to set the background color on the actual element instead of the text (like you have done now), so that you can assign padding for the box after it changes. Custom CSS:
Code
.image-intro-content {
    display: inline-block;
    background: #ad1850cf;
    padding: 1rem 2rem 0;
}
Then remove the background color for h1 and .styled selectors, as you have now.

Re: CSS formating title and subtitle in header

Posted: 04 Jul 2023, 02:46
by trpgforum
Hello Karl

Once again great support, combined with equally great expertise. Of course it all worked out and now it looks much more professional!

https://www.thomas-ruf.ch/ausstellung/

Thanks very much!

Best regards from Basel
Thomas