I want and I’m trying position the icon menu to her right edge to be equal to right edge of the image at the bottom. I don’t know why, but this icon won’t move :P. What’s wrong? How can I fix this? Here I am adding what does it look like:
enter image description here
I tried to add margin-left: auto on the icon-navigation class, display flex on a container. Then either flex grow on one child so it takes up as much space as possible. And I tried to add justify-content: space-between. But none of these ways doesn’t work. If it’s not working, there must be something wrong with the code structure (html or somewhere else a css property is overriding it), but I can’t find what is wrong.
This is my github: https://github.com/NatKacz99/news-homepage.
This is the live page: https://natkacz99.github.io/news-homepage/
2
Answers
There is nothing wrong with your navigation css. On your defined screen width i.e
375px
, the menu icon is set to the right of the navbar. Although the issue lies with your.container
class. You have set some padding to it and it makes the total width of container exceed the actual width of viewport. This results in ahorizontal scroll
. Due to this scroll you are unable to visualize that yournav
menu icon is actually at its right place.You can modify the CSS in
style.css
as follows, and you should be good to go.PS You should get the out put as follows:
If Able to Comprehend your query Correctly you need to Position the ICON to the Right Side of the Screen,
After Reviewing your Code I suggest this changes in CSS file,
Check this Output:
Hope it Helps.
[Output]: https://i.sstatic.net/WfrNTJwX.png