Tagged: color section, svg
Ich habe als Header auf einer Seite die Farbsektion mit der Einstellung „Mindestens 50% der Browser-Fensterhöhe“. Ich habe nun einen Inline SVG-Code als Code-Block eingefügt. Wenn ich keine Angaben zu Breite und Höhe mache, wird das SVG komplett über den gesamten Bildschirm angezeigt, ohne Rücksicht auf die 50%. Wie kann ich der SVG-Grafik mitgeben, dass diese ZWINGEND die 50% einhält und die Grafik z. B. in der Höhe vollständig in die 50% Browser-Fensterhöhe einpasst?
Hi JKnoblach,
Could you post a link to where we can see the results you are getting please?
Best regards,
Rikard
Hi,
Thank you for the info.
Have you tried applying a height limit to the color section containing the svg image? The svg image should inherit the height of its parent container, so this should work.
.page-id-7062 #av_section_1 {
max-height: 50vh;
}
To avoid using generic selectors such as the one above (#av_section_1), you could apply a unique custom css class name or ID to the color section element from its Advanced > Developer Settings panel.
Best regards,
Ismael
Hi Ismael,
the color section works with 50% now, but the SVG doesn’t fit into the color section. It’s still 100% about the hole display.
Hi,
Thank you for the update.
Would you mind providing access to the dashboard or to the page so that we could check the svg code properly? Please post the login details in the private field.
Best regards,
Ismael
I almost got it worked with the svg, but it is a little bit below the color section line.
Hi,
Thank you for the update.
You should be able to use this css code to pull the svg image upwards and make sure that it is within the color section.
.page-id-7784 #av_section_1 svg {
margin-top: -75px;
}
Best regards,
Ismael
Thank you so much. It works perfect! You can close this thread.
Hi JKnoblach,
Great :)
We are closing the thread.
If you need further assistance please let us know in a new one.
Best regards,
Victoria