ed_bb
November 29, 2023, 8:31am
1
Hi,
I have created a video background using this code I found online :
# {{ section.settings.heading }}
{{ section.settings.link_text }}
{% schema %}
{
"name": "Video Background Banner",
"settings": [
{
"type": "text",
"id": "heading",
"label": "Overlay text"
},
{
"type": "url",
"id": "video_url",
"label": "Enter the video url here"
},
{
"type": "image_picker",
"id": "poster",
"label": "Add fallback background image in case video doesn't load"
},
{
"type": "text",
"id": "link_text",
"label": "Enter CTA button text (if required)"
},
{
"type": "url",
"id": "link_url",
"label": "CTA button link page"
},
{
"type": "range",
"id": "blur",
"min": 0,
"max": 10,
"step": 0.1,
"unit": "px",
"label": "For low quality video add blur",
"default": 0
},
{
"type": "range",
"id": "opacity",
"min": 0,
"max": 1,
"step": 0.1,
"label": "Change video opacity",
"default": 1
}
],
"presets": [
{
"name": "Video Background Banner"
}
]
}
{% endschema %}
The video works and all looks fine but the text overlay is central to the video and doesn’t look how I want. How would I go about changing the text overlay position to top left corner with a white box/background for the text, please?
Thanks.
i can’t find the video section please send me page URL in which there you add the video
ed_bb
November 29, 2023, 8:55am
5
It’s the main video banner on the home/landing page @
https://baileybespoke.co.uk/
Thanks.
you want this container on top left
ed_bb
November 29, 2023, 9:01am
8
Hi @websensepro
Yes, correct.
However would ideally prefer it to be a white background box or just text and button with no background box for the text.
Thanks.
do to want this one styling
ed_bb
November 29, 2023, 9:10am
10
Almost, would want it top left floating so not touching the top of side if that makes sense?
Also, is there anyway to make the text run over 2 lines instead of the box being wider?
Thanks.
ed_bb
November 29, 2023, 9:24am
12
In from the left slightly, box more square than rectangle, please.
Thanks.
ed_bb
November 29, 2023, 9:35am
14
Yes!
Looks good, thank you. Could you advise on code?
.hero {
display: flex;
justify-content: flex-start !important;
align-items: flex-start !important;
}
.hero > div {
width: 43rem;
padding: 20px 1%;
height: 50%;
background-color: white;
margin-top: 2%;
margin-left: 2%;
}
1 Like
ed_bb
November 29, 2023, 9:43am
16
Thank you very much indeed
Enjoy the rest of your day!
ed_bb
November 29, 2023, 9:46am
17
Sorry, one more question…
How do I make it so the white box is contained within the limits of the page/screen on mobile?
See screenshot - the right side hangs over the edge of the screen but want it to look like the left side does, please.
Thanks.
ed_bb
November 29, 2023, 10:04am
18
Don’t worry - I’ve sorted. Thanks.
Do you happen to know how to add a video background to your actual header section in dawn theme?
ed_bb
March 31, 2024, 1:47pm
20
@beyondstore Apologies, I do not. I know the Motion theme has it as standard as do some others but not code I have I’m afriad. I wish I did!