Lesson 6 CSS Controling Images
Lesson 6 CSS Controling Images
Controlling Images in
CSS
CSS Controlling Images
You can control the size of an image using
the width and height properties in CSS, just
like you can for any other box.
Specifying image sizes helps pages to load
more smoothly because the HTML and CSS
code will often load before the images, and
telling the browser how much space to leave
for an image allows it to render the rest of the
page without waiting for the image to
download.
Sample
Aligning Images
float property can be used to
move an element to the left or the
right of its containing block,
allowing text to flow around it.
Aligning Images
Rather than using the <img>
element's align attribute, web
page authors are increasingly
using the float property to align
images. There are two ways
that this is commonly achieved:
Aligning Images
1: The float property is added to the
class that was created to represent the
size of the image (such as the small
class in our example).
Backdrops:
- These are full sized
backdrops, just scale them up!
- Can be Copy-Pasted out of
Templates for use anywhere!