Welcome to Bucaro TecHelp!

Bucaro TecHelp
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Victims of Sandy Hook

Stop the Slaughter of Innocents. Congress is bought and paid for by gun lunatics and gun promotion groups. If you want to live in a safe America, help buy Congress back for America. Send a donation to Mayors Against Illegal Guns, 909 Third Avenue, 15th Floor New York, NY 10022

How to Make Images Responsive

Normally images on a webpage have a have a fixed width and height. But with today's widespread use of mobile devices, you might want to use a little easy style code to make them adjust their size if your webpage is displayed on a small mobile smartphone screen.

Google's mobile-friendliness design tester

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<style>
img
{
width: 100% ;
height: auto;
}
</style>

<title></title>
</head>
<body>

<img src="hibiscus.jpg" />

</body>
</html>

The code shown above creates a webpage that reduces or increase the image's width to be the same width as the webpage, and reduces or increase the image's height the same proportion.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<style>
#half
{
float: right;
width: 50%;
height: auto;
}
</style>

<title></title>
</head>
<body>

<img id="half" src="hibiscus.jpg" />

</body>
</html>

The code shown above creates a webpage that reduces or increase the image's width to be half the width as the webpage, and reduces or increase the image's height the same proportion. By default the image would end up on the left side of the page, but the style float: right; causes it to be on the right side of the page.

RSS Feed RSS Feed


Follow Stephen Bucaro Follow @Stephen Bucaro


Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2017 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268