When I host the web that I just designed, it came out differently from the screen I made, so it came out differently even if I adjusted the size and tried again What's wrong with him?
-- index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>My Map</title>
<link rel="shortcut icon" href="myicon.ico" type="img/direction.png">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="view">
<div class="view2">
<img src="img/mainimg.PNG" alt="">
<h1>My Map</h1>
<p>
'My Map' is for people with<br>
disabilities only. We wanted<br>
to help people with disabilities<br>
go where they want to go, not<br>
where they need to go.
</p>
</div>
</div>
<div class="menu">
<img src="img/direction.png" alt="">
<h1><a href="index.html">My Map</a></h1>
<h3>for the disabled</h3>
<ul>
<li><ahref="location.html"> Location</a></li>
<li><a href="#">Finding directions</a></li>
<li><ahref="#"> Public Transportation</a></li>
</ul>
</div>
</body>
</html>
-- style.css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif;
}
.view {
width: 1200px;
height: 700px;
float: left;
}
.view img {
width: 350px;
height: 450px;
margin-top: 100px;
margin-left: 150px;
float: left;
}
.view h1 {
padding-top: 230px;
padding-bottom: 10px;
text-align: center;
font-size: 50px;
}
.view p {
text-align: center;
font-size: 25px;
}
/* /* view2 */
.view2 {
width: 1200px;
height: 710px;
background-color: #FAFAFA;
border-radius: 30px;
margin: 20px 20px;
position: relative;
}
.view2 .mapbtn {
position: absolute;
top : 7px;
right: 100px;
background-color: #FAFAFA;
border: none;
}
.view2 .map {
position: absolute;
top: 30px;
right: 30px;
}
/* /* menu */
.menu {
width: 300px;
height: 758px;
float: right;
}
.menu > h1, h3 {
text-align: center;
}
.menu h1 a {
text-decoration: none;
color: black;
}
.menu h3 {
padding-bottom: 100px;
}
.menu img {
width: 100px;
height: 100px;
margin-top: 100px;
margin-left: 100px;
}
.menu ul {
list-style: none;
text-align: center;
}
.menu ul li {
font-size: 25px;
padding-bottom: 60px;
}
.menu ul li a {
text-decoration: none;
color: black;
}
.menu ul li a:hover {
color: #FFBA00;
}
/* /* location */
.map {
width: 1140px;
height: 500px;
background: url(http://i1.daumcdn.net/dmaps/apis/loading_n.png);
}
When it's not hosted
Have you ever posted css/style.css
on that web hosting? Try emptying your browser cache.
© 2024 OneMinuteCode. All rights reserved.