Hi, I’m a true beginner. I’m trying to understand basic concepts. I’d like to insert a logo under the nav bar. I’m not sure I coded it correctly. It’s not showing up. Thank you so much.
Repl link:
code snippet
Hi, I’m a true beginner. I’m trying to understand basic concepts. I’d like to insert a logo under the nav bar. I’m not sure I coded it correctly. It’s not showing up. Thank you so much.
Repl link:
code snippet
Welcome to the community! From your description, I assume you are using HTML. Please include the link to your Repl so that we can try to determine the issue.
HTML image embedding
<img src="path/to/img.png"/>
<img src="https://url-to-image"/>
Either of the above options work. Note that the image does not have to be a PNG, but you do need to include the file name extension in the file path. In the second example, that is not a real URL, but you can put in a valid image path URL.
Thanks! I thought I did include the link. I am using html/css
You’re welcome! I added the code here. Also, you had a comment that just continued on and stopped several of your elements from closing properly. I undid that as well.
Basic example:
<header>
Stuff<!--
</header>
Becomes
<header>
Stuff
</header>
EDIT: If you want to change where the image is, you’ll have to use CSS.
If this solved your problem, please mark this topic as “solved”.
Thanks so much. I have CSS code for the logo. Is it correct? I really appreciate it.
The only CSS you need is for the class logo
. Since the image is in a <div>
with that class, it will be affected by it. Your extra CSS class for the image is unnecessary.
For example, this centers the image horizontally:
.logo {
text-align:center;
}
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.