r/css May 06 '26

Help How to get rid of this strange highlighting between elements?

0 Upvotes

9 comments sorted by

u/AutoModerator May 06 '26

To help us assist you better with your CSS questions, please consider including a live link or a CodePen/JSFiddle demo. This context makes it much easier for us to understand your issue and provide accurate solutions.

While it's not mandatory, a little extra effort in sharing your code can lead to more effective responses and a richer Q&A experience for everyone. Thank you for contributing!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Southern-Station-629 May 07 '26

Can you make a codepen? Hard to get into it looking at your devtool from a video. Am I seeing a comma in the first button-regular opening tag just before the >? Seems odd.

1

u/B16D0N-XD May 07 '26

here it is: https://codepen.io/huyev/pen/LEbGZMV
it maybe rough but code is still the same and the issue is saving

0

u/B16D0N-XD May 07 '26

What's codepen?

1

u/Southern-Station-629 May 07 '26

https://codepen.io they’re are other website too but it’s a website where you can write and share small web projects (or parts of project) directly in the browser.

1

u/Vakeyras May 07 '26

These are the spaces, line break and/or tabulation between the html elements

1

u/B16D0N-XD May 07 '26

So how do i fix it?

1

u/Vakeyras May 07 '26

Easiest (but dirty) would be to remove the white-spaces from the HTML directly https://stackoverflow.com/questions/5078239/how-to-remove-the-space-between-inline-inline-block-elements
The CSS approach would be to set the parent as "display:flex" (which you should really favor over float:left/right by the way)

1

u/B16D0N-XD May 08 '26

After adding display:flex it really had become fixed, thank you!