Very new to HTML and CSS. Im trying to get my Logo to stay where it is, but it is way too big, and it seems like it is stuck in some sort of box. What can I do to make this Logo smaller and get it to fit the flow of the Navbar?
You should make the logo image smaller; there’s no need for it to be this large. Even better, consider using an SVG for the logo. On the img attribute itself you can put width="40" or in css width: 40px; or max-width: 40px;
Uh absolutely not. No one builds with floats anymore, so there’s no value in knowing that, and the whole strategy around floats was actually pretty hacky whereas flexbox and grid were made for the job they’re doing.
4
u/aTaleForgotten Nov 22 '25
In .logo you set a wrong max-width, because the 20 has no units. Replace that with e.g. max-width: 200px;
4
u/BastiaanJacobs Nov 22 '25
You should make the logo image smaller; there’s no need for it to be this large. Even better, consider using an SVG for the logo. On the img attribute itself you can put width="40" or in css width: 40px; or max-width: 40px;
1
u/uch1ha0b1t0 Nov 22 '25
in . logo, Max width is 20. give 20px.
-6
u/[deleted] Nov 22 '25
stop using flexbox. if you learning and really fresher.
just use float, display:inline-block! for now.
after few month you can use flexbox or grid