- This topic has 7 replies, 4 voices, and was last updated 6 years, 7 months ago by Tom.
-
AuthorPosts
-
August 17, 2015 at 8:44 am #129940Marko
Hello guys,
I don’t seem to find anything related to setting the height of a section.
I just want 4 sections that link to specific categories. For every section I have a background image. All of the images have the of 1500x500px. Above this image just a short text, a sentence or two. It just has to look good.
But when I insert the background image it’s automatically very slim and just show a slim stripe of the image.
Is there like a recommended background image size? Do I have to edit the CSS in order show the background image normally? Any tips?
Here is a screenshot: https://drive.google.com/file/d/0B5Fus0stire6VFJUUnpCVFZTbk0/view
August 17, 2015 at 8:53 am #129942Jean Paiva DeveloperHello Marko,
You can specify top padding and/or bottom padding for each section:
The value is Pixels.
August 17, 2015 at 9:07 am #129949MarkoHey Jean,
well it looks like this is the easiest option. It also affects the position of the text, but then I have to change the bottom padding or add a nbsp in the text. For now I can live with this solution.
One more question while we are talking about section: Can I set the whole background image as a link?
Thanks a lot, Marko
August 17, 2015 at 10:48 am #129970Jean Paiva DeveloperYou plan to use for all sections a diferent link, or want in only one section? Maybe I can come up with something based on your needs.
August 17, 2015 at 10:56 am #129974MarkoYes, every section should link to a different category. 4 sections should link to 4 different categories. That would be the best option probably.
Let me know if you have something.
Thanks a lot, Marko
August 17, 2015 at 1:42 pm #130034TomLead DeveloperLead DeveloperHi Marko,
Definitely tough to achieve..
One option, maybe..
1. Add an image to your section with a link around it:
<a href="http://generatepress.com"><img src="URL TO FULL BACKGROUND IMAGE" alt="" class="full-section-bg"></a>
Then add this CSS:
.full-section-bg { height: 100vh; left: 0; object-fit: cover; position: absolute; top: 0; width: 100vw; }
Just a theory – but it may work.
Let me know 🙂
September 17, 2017 at 6:10 pm #387118joecockerHey Tom, warming up this topic a bit because my question is related to section height as well:
I have some sections with an inclusion of dynamic content with differing height, so I need a dynamic height for this content – otherwise the content is hidden. So, is it possible to have a dynamic section height, perfectly growing with its external content
? You can see this here: http://www.haus-jasmin-buesum.de/apartments/ …Would be nice to have and thanx a lot in advance
JuergenSeptember 18, 2017 at 12:18 am #387201TomLead DeveloperLead DeveloperElement heights will adjust to their content by default – the more content/padding, the taller the element will be.
-
AuthorPosts
- You must be logged in to reply to this topic.