Logo Issue

The logo is too small. I want to make it fit in the navbar.
94 Replies
beans
beansā€¢17mo ago
try changing the width or heigh
Lia
LiaOPā€¢17mo ago
it doesnt work. already tried it changes along with the header
b1mind
b1mindā€¢17mo ago
without code we can only guess
Lia
LiaOPā€¢17mo ago
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: white;
}

li, a {
text-decoration: none;
color: black;
}

header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 20px 5%;
}

.logo {
cursor: crosshair;
width: 100px;
height: 100px;
}

.nav-links {
list-style-type: none;
}

.nav-links li {
display: inline-block;
padding: 0px 20px
}
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: white;
}

li, a {
text-decoration: none;
color: black;
}

header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 20px 5%;
}

.logo {
cursor: crosshair;
width: 100px;
height: 100px;
}

.nav-links {
list-style-type: none;
}

.nav-links li {
display: inline-block;
padding: 0px 20px
}
import React from 'react';
import image from '../public/Transaction1.png'

function Navbar (): JSX.Element {
return (
<header>
<img src={image.src} alt='logoPlaceholder' className="logo" />
<nav>
<ul className='nav-links'>
<li>About</li>
<li>Services</li>
</ul>
</nav>
</header>
)
}

export default Navbar;
import React from 'react';
import image from '../public/Transaction1.png'

function Navbar (): JSX.Element {
return (
<header>
<img src={image.src} alt='logoPlaceholder' className="logo" />
<nav>
<ul className='nav-links'>
<li>About</li>
<li>Services</li>
</ul>
</nav>
</header>
)
}

export default Navbar;
b1mind
b1mindā€¢17mo ago
should have guessed... React xD you have strict sizing on the logo 100px its not going to grow/shrink beyond those
Lia
LiaOPā€¢17mo ago
wdym
b1mind
b1mindā€¢17mo ago
Aslo as a flex child it will always become dense so it will be the size you set it.
Lia
LiaOPā€¢17mo ago
kevin powell bless me šŸ™
b1mind
b1mindā€¢17mo ago
I mean you are setting the size to w/h 100px so its going to be 100px period Maybe step back from learning React and learn the basicis of HTML/CSS first šŸ˜„
Lia
LiaOPā€¢17mo ago
yeah but if i get it too big, the header gets too bize aswell
b1mind
b1mindā€¢17mo ago
This is the meme ...
Lia
LiaOPā€¢17mo ago
look
b1mind
b1mindā€¢17mo ago
b1mind
b1mindā€¢17mo ago
same applies
Lia
LiaOPā€¢17mo ago
Lia
LiaOPā€¢17mo ago
LMAO SAME EXACT MEME šŸ’€ see?
b1mind
b1mindā€¢17mo ago
yea cause people think they can just skip CSS/HTML cause its not important "get right to the React!" when you can't even make a simple staic page xD
Lia
LiaOPā€¢17mo ago
why this meme is so accurate
b1mind
b1mindā€¢17mo ago
because its common af I see it weekly
Lia
LiaOPā€¢17mo ago
i tought i where the only guy lmao anyways see?
b1mind
b1mindā€¢17mo ago
no its probably because you were told to "learn React"
Lia
LiaOPā€¢17mo ago
the logo gets bigger when i update width and height of logo
b1mind
b1mindā€¢17mo ago
so you are just doing that... without realizing React sux and is only one way to make websites (probably the worst way) I would take a CSS coures and take it seriousl.y
Lia
LiaOPā€¢17mo ago
Lia
LiaOPā€¢17mo ago
i want it like this, not the navbar but the size must be readable so idk whats the problem
Jochem
Jochemā€¢17mo ago
without your live code, it's hard to say. People are way worse code interpreters than browsers, and there's a ton of stuff I'd miss just reading someone's code rather than seeing it rendered in my own browser where I can poke at it with the dev tools you've got a 20px top and bottom padding on your header, which might make the image smaller because it has to fit inside that padding also, your image might have an built-in border of empty space, which would make it appear even smaller try moving the padding onto the nav, that should give your image an extra 20px, otherwise make an example on codepen like described in #How To Ask Good Questions
Lia
LiaOPā€¢17mo ago
hold on does codepen support react
Jochem
Jochemā€¢17mo ago
just make the example in HTML, react has nothing to do with this issue
Lia
LiaOPā€¢17mo ago
its a css issue
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: white;
}

li, a {
text-decoration: none;
color: black;
}

header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 20px 5%;
}

.logo {
cursor: crosshair;
width: 300px;
height: 300px;
}

.nav-links {
list-style-type: none;
}

.nav-links li {
display: inline-block;
padding: 0px 20px
}
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: white;
}

li, a {
text-decoration: none;
color: black;
}

header {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 20px 5%;
}

.logo {
cursor: crosshair;
width: 300px;
height: 300px;
}

.nav-links {
list-style-type: none;
}

.nav-links li {
display: inline-block;
padding: 0px 20px
}
Jochem
Jochemā€¢17mo ago
yes, it is which means it has nothing to do with react
Lia
LiaOPā€¢17mo ago
<header>
<img src='test' alt='logoPlaceholder' className="logo" />
<nav>
<ul className='nav-links'>
<li>About</li>
<li>Services</li>
</ul>
</nav>
<header>
<img src='test' alt='logoPlaceholder' className="logo" />
<nav>
<ul className='nav-links'>
<li>About</li>
<li>Services</li>
</ul>
</nav>
and the end header tag i think i should like make a div to handle all stuff and put the img and header separated
Jochem
Jochemā€¢17mo ago
I've suggested something that might help (remove the 20px padding on the header), I can't help any more without a live demo šŸ¤·
Lia
LiaOPā€¢17mo ago
wait
Jochem
Jochemā€¢17mo ago
you just pasted your react code in there, the classes aren't applying because it's still called className instead of the appropriate class
Lia
LiaOPā€¢17mo ago
done
Jochem
Jochemā€¢17mo ago
it's still classname instead of class
Lia
LiaOPā€¢17mo ago
my bad lol
Jochem
Jochemā€¢17mo ago
did you even look at the pen before you link it? like, I'm trying to help but right now you're just wasting my time tbh
Lia
LiaOPā€¢17mo ago
ok done sorry indeed
Jochem
Jochemā€¢17mo ago
that looks like a pretty big logo to me?
Lia
LiaOPā€¢17mo ago
its a square one default is 500x500
Jochem
Jochemā€¢17mo ago
the image file you have you mean?
Lia
LiaOPā€¢17mo ago
yep
Jochem
Jochemā€¢17mo ago
and a lot of it is white space, top and bottom?
Lia
LiaOPā€¢17mo ago
it's just a png i dont want it to be the issue causing all this mess, else I just feel like i'm so stupid
Jochem
Jochemā€¢17mo ago
is there a lot of blank space at the top and bottom in this PNG? cause the logo in the first screenshot certainly doesn't look like it's square to me. The actual logo part of the image I mean I'd suggest opening paint and removing the white space at the top and the bottom of your image
Lia
LiaOPā€¢17mo ago
Lia
LiaOPā€¢17mo ago
it's just png
Jochem
Jochemā€¢17mo ago
yeah, perform a crop on that image
Lia
LiaOPā€¢17mo ago
how much do you recommend for it to be the same side as the navbar
Jochem
Jochemā€¢17mo ago
the PNG should have the very top pixel of the logo on the top row of pixels, and the very bottom of the logo at the very bottom of the image same for left and right if you need padding, handle that in your CSS
Lia
LiaOPā€¢17mo ago
i dont get what ur saying -- can u explain it like ur explaining to a 5yo
Jochem
Jochemā€¢17mo ago
You have this in a PNG
Jochem
Jochemā€¢17mo ago
make it so that the PNG is like this:
Jochem
Jochemā€¢17mo ago
Lia
LiaOPā€¢17mo ago
wait
Jochem
Jochemā€¢17mo ago
change the PNG
Lia
LiaOPā€¢17mo ago
if thats the issue Im just idiot šŸ’€
Jochem
Jochemā€¢17mo ago
open paint, select the logo, click "crop", save as, use that image instead
Lia
LiaOPā€¢17mo ago
works with non office users?
Jochem
Jochemā€¢17mo ago
I don't know what you mean
Lia
LiaOPā€¢17mo ago
its a microsoft thing
Jochem
Jochemā€¢17mo ago
you're not an idiot, you just clearly have very little experience with HTML and CSS that you absolutely, positively need if you're going to be working with React or any other framework use whatever you want to clip your image
Lia
LiaOPā€¢17mo ago
i can just resize it ig
Jochem
Jochemā€¢17mo ago
resizing it will shrink the image, you have to crop it are you on windows or some other OS?
Lia
LiaOPā€¢17mo ago
yeah windows
Jochem
Jochemā€¢17mo ago
open this:
Jochem
Jochemā€¢17mo ago
then click file, open:
Lia
LiaOPā€¢17mo ago
nah im just using an online stuff which is more precise ill let yk if this worked
Jochem
Jochemā€¢17mo ago
šŸ‘ no idea where you're getting that idea from btw
vince
vinceā€¢17mo ago
fwiw I agree with everyone else that you should be learning html css and js before even touching react
Jochem
Jochemā€¢17mo ago
just please, please, please, learn HTML, CSS, and JavaScript before you go on with your React journey. It will save you so much pain
Lia
LiaOPā€¢17mo ago
ik typescript i don't need that dummy lang
vince
vinceā€¢17mo ago
TS compiles into JS
Lia
LiaOPā€¢17mo ago
ATTENTION ALL it kinda worked all i need is proper resizing now look
Lia
LiaOPā€¢17mo ago
Lia
LiaOPā€¢17mo ago
this is the current situation i want the logo the be the SAME size as the nav stuff..
vince
vinceā€¢17mo ago
+1 to everyone who said to put it into codepen You'd have your answer already
Jochem
Jochemā€¢17mo ago
what Vince said, yeah change the height, remove the width
Lia
LiaOPā€¢17mo ago
wait HOLD ON MOMENT OF TRUTH @jochemm UR THE BEST NAH AFTER THIS I AM AN IDIOT I DONT NEED ANY CERTIFICATION TO PROVE THAT šŸ˜­ ā˜ ļø ong tsym
vince
vinceā€¢17mo ago
You're not an idiot you just don't know any of the prerequisites to using React. Why are you even using React anyway? If you're making a static page I stg lmao
Jochem
Jochemā€¢17mo ago
@micahhh_06 Out of gratitude for the help you've received, spend the time you'd devote to learning react over the next couple of days, learning the basics of HTML and CSS instead šŸ™‚
Lia
LiaOPā€¢17mo ago
i am just too lazy like look i am 15 and want to develop advanced stuff i just skip the basics on everything i go straight to advanced
Jochem
Jochemā€¢17mo ago
you can't skip the basics
vince
vinceā€¢17mo ago
You're 15 so if you spend the next 5 years hammering the fundamentals you'll be better than 97% of people your age at web dev
Lia
LiaOPā€¢17mo ago
i dont wanna do web dev as a job
Jochem
Jochemā€¢17mo ago
but you do you. I'm just not going to bother answering super basic questions if you can't be bothered to watch a couple of quick tutorial videos šŸ¤·
Lia
LiaOPā€¢17mo ago
i think i want to be a day trader kevin powell uses intro doesnt it if he uses it then no
vince
vinceā€¢17mo ago
Fair enough but you should still learn the fundamentals, like Jochem said you can't skip the basics otherwise you're going to be here asking questions every day Which is fine but they're gonna be questions you could have answered yourself if you spent some time on the fundamentals
Jochem
Jochemā€¢17mo ago
I don't know what this means
Lia
LiaOPā€¢17mo ago
i promise does kevin powell has intro on his vids or he is straight to the point like i never watched any of his vids before but ik he's a css god
Jochem
Jochemā€¢17mo ago
then watch some if you find his intros too long, then don't watch any more?
Lia
LiaOPā€¢17mo ago
wait i just realized i can just press a key to skip 5s šŸ’€ ok man im being way too dumb ty for all šŸ«¶
Want results from more Discord servers?
Add your server