Jump to content

Reduce row height to a fractional value in a section

Go to solution Solved by tuanphan,

Recommended Posts

so I have a section element:  section[data-section-id="6500cf46b05002592d3d8b5f"]  that I am using to keep a photo from going behind the header nav.  I would like to decrease the padding/block height inside that section to less than 1 block high.  I've tried a few codes from searching on here but I can't seem to get them to do what I want. Anyone have any ideas?  thank you

Link to comment
  • Replies 8
  • Views 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

sure.  https://www.bulman-gunleather.com/

This is the section on the home page:   section[data-section-id="650104134757da31113891f2"]

The one above was from a different page but they are the same.

 

I have one on every page that has a large photo right below the nav menu.  The other option I guess would be to add a white block to the top of the photo that is the height of the menu.  But not sure if that would get funky when viewed on certain tablets and/or phones.  Figured if I could get that section basically no height it would be better.

 

One other question since I have ya.  I have CSS so that links in the header menu change color on rollover, but I can't get that code to work for my mega menu.  Any help with that would be fantastic as well  I want the roll over color to be #AE8932  The section for the mega menu is: section[data-section-id="64fdfd78bc5e31346301519b"]

Thanks!

Link to comment

With first question, you need to set top section height, unless it will create gap on mobile

You can use this CSS code

@media screen and (max-width:767px) {
[data-section-id="650104134757da31113891f2"] {
    min-height: Unset !important;
    height: 8vh !important;
}
}

image.png.f771210912d5ca5dba4e5f5e421bccbe.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Tuanphan, that worked great. I tweaked the code so it works for both desktop and mobile.  Seems to be working fine with both.  Thanks!!!


@media screen {
[data-section-id="650104134757da31113891f2"] {
    min-height: Unset !important;
    height: .8vh !important;
}
}

 

Any ideas about the roll over color in that mega menu?

Link to comment
  • Solution
On 9/22/2023 at 5:28 AM, jbholsters said:

Tuanphan, that worked great. I tweaked the code so it works for both desktop and mobile.  Seems to be working fine with both.  Thanks!!!


@media screen {
[data-section-id="650104134757da31113891f2"] {
    min-height: Unset !important;
    height: .8vh !important;
}
}

 

Any ideas about the roll over color in that mega menu?

Use this CSS code

/* mega menu links hover */
.show-mega-menu a:hover * {
    color: #ae8932 !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.