Are you supposed to make CSS resets in WordPress? Unknown styles are messing with me

[ad_1]

Trying to build my first site. Using block editor and 2023 theme.

Very often, im experiencing layout issues because some default margin or padding is present somewhere. Its very annoying, and in this example, i cannot even tell why the margin exists. I have an identical layout in another page without this issue:

​

[Should be directly under nav, yet inspect does not show any issues on any elements. Works on frontpage.])

I want all my margins and paddings to be made *in the block editor*. Not forced upon me from places i dont know of.

​

**It got me thinking: I always made CSS resets when coding for this reason. Is that something you do in WordPress as well?**

[ad_2]
4 Comments
  1. Some plugins have an annoying habit of introducing css issues globally, if they’re not well developed and contained to the feature they come with. Even if they are, they often have controlling selectors that need to be commented out or over-ridden l, in order to maintain your theme consistency.

    Some plugins offer the ability to switch styles or doable so you can implement your own – it all depends what you’re using.

  2. I haven’t in Gutenberg, no. Also you’re seeing what I think is one of the stronger complaints I have about Gutenberg right there. It’s often hard to see why random spacing is happening because of all the layers with default styles. Plus, random spacing that’s hard to find seems to find its way into the editor far too frequently, and after searching through all the settings, next thing you know I’m back to writing custom css to hack their blocks, and that’s BS. Even the add ons for Gutenberg seem to present these issues.

    Try Breakdance or Bricks instead. They’re light years ahead of Gutenberg already, and they both give you far more control, and better features to use on your sites.

  3. >I always made CSS resets when coding for this reason. Is that something you do in WordPress as well?

    If I am building my own theme, yeah.

    If you can post a link we can try to help you figure this out.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer