-3
I’m trying to make the image I put, in case the logo, stay in the upper left corner of the HTML page, and the right side the main menu, without any kind of space between them. But when I insert the image, the menu automatically goes underneath it. Is there a CSS style that can solve the problem? I have the following HTML code:
<html>
<head>
<img src="logoempresa.jpg" widht="150px" height="250px" title="Infotec" >
<style type="text/css">
body {
background-color: lightblue;
}
h1 {
color: black;
padding: 60px;
}
body{
margin: 0;
top: 0;
padding: 0;
background-color: lightblue;
}
#menu ul {
margin: 0;
background-color: #0A6FF0;
list-style: none;
}
#menu ul li{
display: inline;<!para ficar em linha-->
}
#menu ul li a{
padding: 30px 10px;
display: inline-block;
color: white;
text-decoration: none;
}
#menu ul li a:hover{
color: #69EEE8;
}
</style>
<meta charset="UTF-8"/>
<title> </title>
</head>
<body>
<div = id="menu"> <!pois vai ser estilizado-->
<ul>
<li><a href = "#">Início</a></li> <!hashtag para significar que nao ira a lugar nenhum-->
<li><a href="#">Cursos</li>
<li><a href = "#">Professores</a></li>
<li><a href = "#">Produtos</a></li>
<li><a href = "#">Contatos</a></li>
</ul>
</div>
<h1> </h1>
<h1><font size="1"></font></p>
<footer> </footer>
</body>
</html>```
Thanks for helping Algeu! My menu is now next to the logo, as in the photo you placed, but was in the vertical position. You know what might be going on?
– Gabriella Rodrigues
I did it! Just put it in the menu ul position: Absolute; Thank you!!
– Gabriella Rodrigues
@Gabriellarodrigues, I am happy to have helped. If the answer helped you, I ask you to mark the answer as a solution. :)
– Algeu Junior