How to have a custom class name for html tag or body tag for every next js page ? #13260
-
In
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hi @1mehdifaraji |
Beta Was this translation helpful? Give feedback.
-
if you add html and body tag for styling in global.css, it is applied to whole app.
|
Beta Was this translation helpful? Give feedback.
-
Ok from my understanding, I assume that you need to have separate styles for your whole app right? One way to fix this, you can define different styles on different routes and all the style can be written in global.css. This link may help. |
Beta Was this translation helpful? Give feedback.
Ok from my understanding, I assume that you need to have separate styles for your whole app right?
The styles defined in your global CSS file imported in
_app.tsx
will be available throughout your application, including theabout.tsx
page component.One way to fix this, you can define different styles on different routes and all the style can be written in global.css. This link may help.