Hello Programmers!
I am working on a 'comics' page of my website. It is going to have multiple pictures (arranged neatly in a table) for the viewer to see and enjoy. I would like to have the images (by default) have a width of 10% of the browser window's width and a height of 10% of the browser window's height. I would also like for the images to resize when the browser's window's width &/ height made bigger/shorter, so that the images will be still seen. Currently, my website just uploads the pictures: they do not have the correct width or the correct height, nor do they resize themselves when needed. Could somebody look at my code below (my images are attached to this post), and suggest a solution for each of these problems? Thanks in advance!
<!DOCTYPE html>
<html>
<head><title> ----------'s Website's Interesting Photos </title>
<style type="text/css">
body {
background-color:orange;
background-image: url('background2.gif');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
background-size:cover;
}
p
{
text-align:justify;
color: red;
font-family: Arial,"Times New Roman", Times, "Courier";
font-size: 25px;
margin-right:5%;
margin-left:5%;
}
h1
{
color: red;
text-align: center;
font-weight: bold;
text-decoration: underline;
font-family: Arial,"Times New Roman", Times, serif, "Courier";
font-size: 40px;
}
h2
{
color: red;
font-weight: bold;
text-decoration: underline;
font-family: Arial, "Times New Roman", Times, serif, "Courier";
font-size: 25px;
}
h5
{
color: red;
text-align: center;
font-weight: bold;
font-family: Arial, "Times New Roman", Times, serif, "Courier";
font-size: 20px;
}
/* Change Highlighted Text and Background's Colors*/
::selection {
background: red;
color:white;
}
::-moz-selection {
background: red;
color:white;
}
</style>
<h1 ><em> Welcome to ------------------'s Website's Comics Gallery! </em></h1>
<center><table>
<tr>
<td><img src="science teachers.gif"></td>
<td><img src="windows and mac.gif"></td>
</tr>
</table></center>
</body>
</html>