-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Html body is not getting full width in tailwindcss #2788
Comments
Your Code Sandbox link doesn't work. Maybe try with https://play.tailwindcss.com/ ? |
@PaulMorel link updated, check now |
@prantadutta it looks fine to me |
@deadcoder0904 just try it in the medium and small screen |
@prantadutta still works for me 🤷♂️ maybe make a minimal repro on Tailwind Play. Codesandbox loads too slow for me at least :( |
@deadcoder0904 Sorry I can't recreate the problem in Tailwind Play. So I created this GIF. |
I am not sure which file to look at? Can you point me to where your |
@deadcoder0904 that's the thing. I can't find any width related code. Actually what happened is that I created this page first with just plain tailwind classes. Then I thought about making it responsive. And this is what I see the first time I opened my dev tools. |
@deadcoder0904 @PaulMorel ok, look at this GIF, guys. I am trying to recreate the problem in Tailwind Play. But I couldn't. Then I noticed that the same line of code works perfectly in Tailwind Play but not with nextjs. I don't know what the problem here is but I shared both the Tailwind Play and NextJS code below.
NextJS Code:
|
@prantadutta Tailwind Play might be using some kind of Normalizr or your Next code might be the issue but still not a Tailwind issue. I recommend asking on StackOverflow :) |
@deadcoder0904 I also asked on Stackoverflow. I haven't got any response yet. But I am using the default template of nextjs examples with tailwindcss. So shouldn't it be normailized? Also, I think tailwind automatically normalizes my code. |
@prantadutta no idea |
@PaulMorel @deadcoder0904 Thanks for helping me out. It turned out I used some containers in different sections. That's how the elements were overflowing. I am closing this issue. Also, I am new to tailwind so any tips on avoiding this kind of errors? |
@prantadutta This has nothing to do with Tailwind. Tailwind is just knowing CSS well enough so you might want to learn CSS properly. It's okay though, even after 5 years, CSS is still my hardest language 😂 |
Adding overflow-hidden to the main container solved it for me |
@Mixpeal Thank you it worked just adding overflow-hidden |
can you please tell me what exactly you changed as I'm facing the same issue |
Hello, I am new in tailwindcss. But I am having an issue here.
Look at the screenshots, the background color is not applying in the navbar. Also the whole html body is not getting full width in medium and small screens.
What I don't understand is that I still haven't used any of the responsive classes from tailwindcss like md, sm or lg. But there are serious problems with width and I tried using tailwind class of w-full and w-screen. None of them work.
Here's the screenshot of the problem
You can find the code here: https://codesandbox.io/s/focused-curran-jdyup
Thanks in Advance.
The text was updated successfully, but these errors were encountered: