-
GrownUpBoy
I’m trying to lower the margin-bottom on the LI elements in my right sidebar widgets.
You can see an example at https://36exposures.com
The text link lists in the “Links” and “Categories” sections have an extra 8 pixels margin-bottom that make everything look a bit too spaced out.
I’ve tried this CSS
.inside-right-sidebar aside ul li a {
margin-bottom:0 !important;
}But it has no effect. If I change margin-bottom:0 to text-decoration:none it removes the underlines from the links. But can’t seem to get the margin set.
Thanks!
Karl
-
Hi Karl,
Try this, the margin is applied to the li element, not the a.
.inside-right-sidebar .widget ul li { margin-bottom: 0; }
-
GrownUpBoy
Amazing, thanks so much!
I thought they were all links so my css would apply. That’s what I get for thinking bigger than my brain allows! 😀
Really appreciate your help!!
Karl
-
GrownUpBoy
Oops! Had to re-open this one.
One last thing in my sidebar that I can figure out. The search box isn’t 100% the width of the sidebar and I’m not able to adjust it. Not sure if it’s a CSS or a configurator thing. But it’s just the theme’s default search widget.
Just need the box including the submit button to be 100% the width of the sidebar (and scale with the sidebar as the page is resized).
Thanks!
Karl
-
Alvind
Hey Karl,
Try adding this CSS to fix that:
.widget button.search-submit { flex-grow: 1; }
-
GrownUpBoy
Thanks Alvind,
That stretches the width of the submit button to match the width of the sidebar. But I need the button to stay its same size and have the search text box grow instead.
So the button stays square and the text box grows / shrinks proportionally to fit the size of the sidebar as the overall browser window size changes.
Thanks!!
Karl -
Alvind
In that case, use this CSS instead:
.widget .search-form { justify-content: space-between; } .widget .search-form label { flex-grow: 1; }
-
GrownUpBoy
OMG I would have never figured that out on my own.. Thanks so much!!
At the risk of asking never ending questions… Is there a way to add radius corners to just the outside of the search widget itself. So the top left and bottom left of the search text input and the top right and bottom right of the submit button?
Thanks again!
Karl
EDIT – I FIGURED IT OUT!
.widget .search-form {
justify-content: space-between;
}.widget .search-form label {
flex-grow: 1;
}.widget button.search-submit {
border-radius: 0px 6px 6px 0px;
}.widget .search-form input {
border-radius: 6px 0px 0px 6px;
}It works – but is there a more efficient way to write that CSS?
-
Alvind
Looks great! That’s already the most efficient way.
-
GrownUpBoy
Much appreciated, sir!!
-
Alvind
No problem!
- You must be logged in to reply to this topic.