-
Notifications
You must be signed in to change notification settings - Fork 27
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
How do I specify width of my dropdown ? #789
Comments
I have my DropDown inside a div like this,
But neither it takes the width of the div nor the width stays inside the div. |
The classes can be used like this: classes=dict(
root='my-class'
), And then you can use a CSS file to define what styles to use for it, like: my-class {
width: 32%;
} |
It doesn't work... the CSS should be inside assets/styles.css ryt ? |
Yes, assets/styles.css. Did the component take on the correct class name you specified, and did those styles from the CSS file attach correctly? If so, you might need to play around a bit with something like my-class {
min-width: 32%;
max-width: 32%;
} or some other possibilities. If the class or styles didn't come through correctly, though, then that's something else entirely. |
No nothing happens :( this is my sample code
This is my css in assets/styles.css
Nothing happens whatever I change in my CSS :( |
If you use the developer tools to inspect the dropdown, does it show the If not, would you share your project structure? It's possible that Dash isn't finding that styles.css file. |
This is the classname
|
I would also add that when I tried to add css for dash it worked fine. |
Oh, it was supposed to be |
I want my dropdown to be a fixed width and also set the items in the dropdown to certain font and size. How do I achieve this ?
Looking at the docs I was able to be see an argument called class but there was no proper definition on what that is.
The text was updated successfully, but these errors were encountered: