Tagged: x
-
AuthorPosts
-
January 13, 2017 at 1:06 pm #1329087
Hey there,
I have been struggling for a while to achieve a responsive typing text on responsive hero image (section background). I searched the forum and the FB group.
Here my css so far:
.heroimage {
position: relative;
}.herotext {
letter-spacing: 1.5px;
font-weight: 500;
color: #f9b330 !important;
text-shadow: 0 1px 0 #3C4544;
position: absolute;
display: inline-block;
top: 500px;
left:-40px;
padding: 0px 10px 0px 10px;
background: rgba(60, 69, 68, 0.55);
}And my site https://www.pmetools.ch
Ideally, I would like:
– the image to be responsive
– the text to display at the bottom on desktop and wrapped left over the full image on mobile.Thanks for helping me out!
Cheers,
Sandra
January 13, 2017 at 10:44 pm #1329539Hi there,
Please update your code to :
.herotext { letter-spacing: 1.5px; font-weight: 500; color: #f9b330 !important; text-shadow: 0 1px 0 #3C4544; display: inline-block; padding: 0px 10px 0px 10px; background: rgba(60, 69, 68, 0.55); left: -40px; position:relative; }
Remove inline CSS
height: 60vh;
from section #1 and addpadding: 100px 0px 39px;
in its style field.Hope it helps.
January 14, 2017 at 3:03 am #1329709January 14, 2017 at 3:21 am #1329722Hello There,
The text is cut because it is positioned -40 pixels to the left. TO resolve this issue, please also add the following css code in the customizer, Appearance > Customize > Custom > CSS
@media(max-width: 767px){ .herotext { left: 0; } }
We would loved to know if this has work for you. Thank you.
January 14, 2017 at 3:55 am #1329745thanks Rue. Done!
It’s actually the image that is cut top and bottom (see snip)
January 14, 2017 at 3:57 am #1329746Here the snip again
January 14, 2017 at 4:24 am #1329759Hello There,
Thanks for updating in! Your image were cut off because the image is a background image and not as an image element. To fully understand how background images works within the section, please check out this topic: https://community.theme.co/forums/topic/section-background-image-2/#post-691126
Hope this helps.
January 14, 2017 at 4:54 am #1329782Thanks Rue. I afraid it doesn’t as background-image: cover; has no effect.
Will continue to search…
January 14, 2017 at 5:02 am #1329785Hi there,
Please change section’s padding to
275px 0px 110px
.Hope it helps.
January 14, 2017 at 5:13 am #1329793There must be another issue, because even if I put padding 1000px 0px 1000px !important; the image remains small…
Here again the css I have
/* hero image and text */
.heroimage {
position: relative;
}.herotext {
letter-spacing: 1.5px;
font-weight: 500;
color: #f9b330 !important;
text-shadow: 0 1px 0 #3C4544;
display: inline-block;
padding: 0px 10px 0px 10px;
background: rgba(60, 69, 68, 0.55);
left: -40px;
position:relative;
}@media(max-width: 767px){
.herotext {
left: 0;
}
}January 14, 2017 at 5:29 am #1329806Please see the attachment, by adding padding, the image is being displayed fine.
Would you please check again and confirm me?
Thanks.
January 14, 2017 at 9:57 am #1329952Yes, it does 😉
Sorry for the hassle and have a good weekend!
January 14, 2017 at 7:45 pm #1330356No Problem. We were always here to help you out.
If you need anything else we can help you with, don’t hesitate to open another thread. -
AuthorPosts