Remove all of the attributes from your <img>
tags except for the src
, and add this code to your css to style the elements:
#bodydiv img{
width:50%;
display:inline-block;
height:50%;
float:left;
}
For most styling, you cannot declare them as html attributes, unless of course by defining them in a style
attribute, which will apply the css to that element.
Also font-color
is actually just color
.
Here is the code with those fixes (and I replaced the image src values with placeholder images so everyone can see it working):
<head>
<meta charset="utf-8">
<link href="https://fonts.googleapis.com/css?family=Abril+Fatface&display=swap" rel="stylesheet">
<style type="text/css">
* {
font-family: "Abril Fatface";
}
header {
display: block;
align-self: right;
}
div {
display: block;
}
#bodydiv {
width: 800px;
}
#bodydiv img{
width:50%;
display:inline-block;
height:50%;
float:left;
}
#footerdiv {
padding-top: 10px;
display: block;
clear: both;
background-color: #00EBCF;
font-size: 15px;
}
h1 {
font-family: "Abril Fatface";
background-color: #00EBCF;
;
display: block;
text-align: center;
}
@media only screen and (min-width: 800px) {
h1 {
font-family: "Abril Fatface";
background-color: #00EBCF;
display: block;
text-align: center;
font-size: 45px;
}
li {
float: left;
margin-right: 10px;
display: inline-block;
}
a:link {
text-decoration: none;
color: black;
font-family: "Abril Fatface";
color: green;
font-size: 20px;
background-color: #94b8b8;
border-radius: 10px;
padding: 10px;
position: relative;
display: inline-block;
}
a:hover {
text-decoration: none;
font-family: "Abril Fatface";
background-color: #A6A6A6;
}
}
@media only screen and (max-width: 799px) {
h1 {
font-family: "Abril Fatface";
background-color: #00EBCF;
display: block;
text-align: center;
font-size: 30px;
}
li {
float: left;
margin-right: 10px;
display: inline-block;
}
a:link {
text-decoration: none;
color: black;
font-family: "Abril Fatface";
color: green;
font-size: 15px;
background-color: #94b8b8;
border-radius: 8px;
padding: 8px;
position: relative;
display: inline-block;
}
a:hover {
text-decoration: none;
font-family: "Abril Fatface";
background-color: #A6A6A6;
}
}
@media only screen and (max-width: 557px) {
h1 {
font-family: "Abril Fatface";
background-color: #00EBCF;
display: block;
text-align: center;
font-size: 25px;
}
li {
float: left;
margin-right: 10px;
display: inline-block;
}
a:link {
text-decoration: none;
color: black;
font-family: "Abril Fatface";
color: green;
font-size: 10px;
background-color: #94b8b8;
border-radius: 4px;
padding: 4px;
position: relative;
display: inline-block;
}
a:hover {
text-decoration: none;
font-family: "Abril Fatface";
background-color: #A6A6A6;
}
}
ul {
list-style: none;
}
</style>
</head>
<body>
<header>
<h1> Yaddah Yaddah blah blah</h1>
</header>
<div style="margin-bottom: 50px;margin-top: 10px">
<ul>
<li><a href="#">blah blah </a></li>
<li><a href="#">blah blah</a></li>
<li><a href="#">random text</a></li>
<li><a href="#">more random text </a></li>
<li><a href="#">blah blah </a></li>
</ul>
</div>
<div id="bodydiv">
<img src="https://via.placeholder.com/500" display="inline-block">
<img src="https://via.placeholder.com/500" height="50%" display="inline-block" ; float="right" ;>
</div>
<div id="footerdiv">
Yaddah yaddah yaddah
</div>
</body>