Jump to content

Weird White Line Around My Custom CSS Section??

Recommended Posts

Site URL: https://defendingabuse.com/our-team/shannon-smith

Hey, all! 

Let me pre-face this with letting you guys know I am pretty new to CSS still.

I have added some custom CSS to make certain sections appear to "float" over other sections - as you can see in the photo below. I tried to round off the edges of that section but it wasn't working, so I added a 10px border to it and rounded off the border to get the same effect.

The problem is, as you can see, there is a very thin white line that goes around the section in between the section edge and the border I added and I cannot figure out how to get rid of it.

It's kind of hard to see in the attached photo but feel free to visit the link and scroll down a little and you'll see what I mean.

Any input is really appreciated.

Thank you

Screen Shot 2021-12-10 at 12.14.20 PM.png

Link to comment
  • Replies 2
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

It seems like there's just a sliver of another background colour coming through on that section. You can try this:

section[data-section-id="618be5a6834cb76419127e86"]{
	/* Other Styles */
	background-color: #17242c!important;
}

But you shouldn't have to add a border to use border-radius. If you were getting some weird behaviour you could read a bit more about it here.

Link to comment

Thank you, that worked.

Yeah, I am not sure why but on certain elements, like the floating sections, I have to add a border in order to round it. Normal "border-radius" does nothing for them, even if I put a !important after the desired radius. 

I think I must have done something in the earlier CSS when I made them float that is affecting it.

Anyway, thank you again I appreciate your response!!

Edited by WuTangForever
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.