The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Remove rem0.5 margin from navigation bar?!

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #270144


    I have been told from a previous thread to remove the 0.5rem margin from my CSS as there was a space between each of the links of the navigation bar, but this is for the whole webpage and therefore the whole layout changes, which isn’t what I would have preferred. All of the content is now tight together as it is now “margin: 0 0rem”. However, I was wondering if there was a way to keep this 0.5rem margin for the whole HTML whilst removing it from the navigation bar only (so it’ll be 0rem). Is this possible?

    Many thanks!

    See the Pen Nav bar troubles by Anon Student (@cssrookie) on CodePen.


    sure… if I understand correctly.

    Use padding instead of margin

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.