How to change top navigation width
I want to change top navigation width like 'max-w-7xl' something, I think I can change using
->extraAttributes()
but where exactly should I need to put this code?22 Replies
use css insted
@larazeus sorry to tag you here, I think my custom css is working, but for some reason
@apply
doesn't work. Below is my code
And this is how I register
What should be the problem?np..
is the file
css/main.css
loaded (no console errors or build error?!)
if you did for testing
Does it work?I don't have any error, but the
main.css
file is not loadedso thats mean filament didnt load the file
where is this code?
I put inside AppServiceProvider, boot()
it should be working
try adding it to the panel Provider
before
return $panel
also it's better if you register a themeIf I put like below then it's working
I am searching for this one
oh then maybe you dont have tailwind clasess in the main.css file?
wdym?
@tailwind base;
@tailwind components;
@tailwind utilities;
in
main.css
Yes, I don't have these, but I've added but no luck
no build errors after adding them?
No error, I run
npm run dev
, I put my main.css inside public/css/
do I need to put inside resources/css?yes you create the file in
resources/css
only
after running
npm run dev
it will be generated in the public/css
are you using vite?yes, i'll change the path and let you know
Now I got console error "GET http://localhost:8000/css/app/main.css?v=3.0.54.0 net::ERR_ABORTED 404 (Not Found)", what I change
1. create css in
resources/css/main.css
2. register like below
3. run npm run dev
and build
also..no keep the register as it was
assets()...
404 again, it looks like
npm run dev
or build
didn't build to public/css/main.css
oh
then check your
vite.config.js
add the main.css to input
arrayI did, and nothing change, after i run
build
I got
but still not reflecting in my website..not sure what could be the issue...
I recommend adding a theme at this point and remove
FilamentAsset::register
https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
you already have way there 🙂Yes, now working perfect.. I should've read this... thank you so much for your help