How to align right ? #607
|
Hi. I am very new to this whole CSS subject and so maybe this is a very stupid question. I have this example: This has started from a W3School template and I try to translate this to PicoCSS. I scanned the pico.css file and I feel I am missing something. |
Replies: 2 comments 1 reply
|
It seems you are trying to create a top menu of some sort ? Then you could use the nav For the JavaScript part you’ll need to improvise because there is no « hamburger menu » in picocss. |
|
Thank you, for nav I guessed so much. The example was maybe slightly mislead 8000 ing. The javascript part is actually only to animate a sidebar in and out. Basically to set the sidebar to block or none. Not that important. My question was more about any other objects, like text or so. Or I want all Headlines to be right aligned, something like that. I guess left aligned is standard, but how would I align the text to the right ? Or do I not get how to work with PicoCSS ? |
You can align any text to the right simply by setting
text-align: right;in your CSS file. In some cases you may also needmargin-left: auto;orjustify-content: flex-end;. Pico provides a very nice set of defaults but you'll still need to add custom CSS for specific use cases.Also, just FYI, W3 Schools is a notoriously unreliable place to get information. I would recommend sites like css-tricks.com, developer.mozilla.org, web.dev/learn/css/, or pretty much anything that isn't W3 Schools.