Quote:
Originally Posted by Gunivortus
Formatting the text works fine, but there are also pictures. I like to get them resized to the screen on which the book is read.
Now, the pictures are small at any device, just take ca. 1/4 of a screen.
How can I get them flexible resized?
|
Here is the CSS and HTML code that I use to size images to be the full screen keeping the correct aspect ratio.
CSS code:
Code:
body {
widows: 1;
orphans: 1;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
text-align: justify;
}
img {
max-height: 100%;
max-width: 100%;
}
.cover {
text-align: center;
text-indent: 0;
height: 100%;
}
HTML code:
Code:
<div class="cover"><img alt="" class="cover" scr="../images/image.jpg"></div>