12/07/2014

How To Create A Simple HTML Scroll Box For Your Images

How To Create A Simple HTML Scroll Box For Your Images

Overview:

If you're looking for a quick and simple way to create a scrolling box for your images, check out this simple tutorial.

Below is the demo I have created of a basic scroll box in HTML, which will allow you to scroll from top to bottom with your mouse to see the images contained inside the area. Let's check out the demo and code!

The Demo:

Self Portrait Illustration
British Marines Illustration
Jack vs Mutant Illustration

HTML:

Below is the simple HTML code as seen above with a few of my illustrations embedded into it:

<div style="border:1px solid black;width:700px;height:466px;overflow:scroll;">

<img src="http://2.bp.blogspot.com/-ZZJPCxGYP4U/U-Z0vdr28XI/AAAAAAAAASQ/W0kZzIpBs5A/s1600/Self_Portrait_By_Justin_Woodie_1.jpg" width="700" height="466" title="Self Portrait" alt="Self Portrait By Justin Woodie" />

<img src="http://1.bp.blogspot.com/-tvuv_qf-HHM/U-Zzp-8zBYI/AAAAAAAAARw/jBmekef-ItM/s1600/British_Marines_By_Justin_Woodie_1.jpg" width="700" height="544" title="British Marines" alt="British Marines By Justin Woodie" />

<img src="http://4.bp.blogspot.com/-9iAmx2aFLig/U-Z0NXfV0zI/AAAAAAAAASI/qMzrgYyUjt0/s1600/Jack_Vs_The_Mutants_By_Justin_Woodie_1.jpg" width="700" height="538" title="Jack vs Mutants" alt="Jack vs Mutant By Justin Woodie" />

</div>

Now lets view the code without my illustrations embedded within it and instead bold text is used as a placeholder, which can be replaced with your own images and information:

<div style="border:1px solid black;width:WIDTH OF SCROLL BOX GOES HERE;height:HEIGHT OF SCROLL BOX GOES HERE;overflow:scroll;">

<img src="#" width="IMAGE WIDTH GOES HERE" height="IMAGE HEIGHT GOES HERE" title="IMAGE TITLE TEXT HERE" alt="IMAGE ALT TEXT HERE" />

<img src="#" width="IMAGE WIDTH GOES HERE" height="IMAGE HEIGHT GOES HERE" title="IMAGE TITLE TEXT HERE" alt="IMAGE ALT TEXT HERE" />

<img src="#" width="IMAGE WIDTH GOES HERE" height="IMAGE HEIGHT GOES HERE" title="IMAGE TITLE TEXT HERE" alt="IMAGE ALT TEXT HERE" />

</div>

Previous Post
Next Post

I'm a creative individual that makes a living from the dynamics of digital technology.

Related Posts

0 comments: