SMF For Free Support Forum

General Stuff => Programming => Topic started by: MMFWCL on August 24, 2009, 12:38:47 pm

Title: [CSS] Image Gallery
Post by: MMFWCL on August 24, 2009, 12:38:47 pm
Note: i obtained the idea from http://www.w3schools.com

Directions:

Go to your AdminCP>Webpage Editor>New Webpage>Find, and click the "HTML" Button>C&P The below code into the text area (AFTER YOUVE OPENED THE HTML BUTTON)


Code: [Select]
<html>
<head>
<style type="text/css">
div.img
{
  margin: 2px;
  border: 1px double black;
  height: auto;
  width: auto;
  float: left;
  text-align: center;
}
div.img img
{
  display: inline;
  margin: 15px;
  border: 1px dotted #ffffff;
}
div.img a:hover img {border: 1px dashed coral;}
div.desc
{
  text-align: center;
  font-weight: normal;
  width: 120px;
  margin: 2px;
}
</style>
</head>
<body>

<div class="img">
 <a target="_blank" href="smfsupport.com"><img src="http://i264.photobucket.com/albums/ii185/jenharsh75/graphics/computerclipart.jpg" alt="Klematis" width="110" height="90" /></a>
 <div class="desc">Add a description of the image here</div>
</div>
<div class="img">
 <a target="_blank" href="smfsupport.com"><img src="http://i264.photobucket.com/albums/ii185/jenharsh75/graphics/computerclipart.jpg" alt="Klematis" width="110" height="90" /></a>
 <div class="desc">Add a description of the image here</div>
</div>
<div class="img">
 <a target="_blank" href="smfsupport.com"><img src="http://i264.photobucket.com/albums/ii185/jenharsh75/graphics/computerclipart.jpg" alt="Klematis" width="110" height="90" /></a>
 <div class="desc">Add a description of the image here</div>
</div>
<div class="img">
 <a target="_blank" href="smfsupport.com"><img src="http://i264.photobucket.com/albums/ii185/jenharsh75/graphics/computerclipart.jpg" alt="Klematis" width="110" height="90" /></a>
 <div class="desc">Add a description of the image here</div>
</div>
<div class="img">
 <a target="_blank" href="smfsupport.com"><img src="http://i264.photobucket.com/albums/ii185/jenharsh75/graphics/computerclipart.jpg" alt="Klematis" width="110" height="90" /></a>
 <div class="desc">Add a description of the image here</div>
</div>
<div class="img">
 <a target="_blank" href="smfsupport.com"><img src="http://i264.photobucket.com/albums/ii185/jenharsh75/graphics/computerclipart.jpg" alt="Klematis" width="110" height="90" /></a>
 <div class="desc">Add a description of the image here</div>
</div>
</body>
</html>


if you know what your doing you should know how to edit this

Credits: 25% Me for editing
75% W3Schools
Title: Re: [CSS] Image Gallery
Post by: GarryRicketson on June 07, 2011, 11:20:33 pm
Forum Url: http://weeklyqbasicandqb64lesson.smfforfree.com/
Ok, and I got this idea from, the previous post  Posted by: MMFWCL
The code was interesting, so I did a edit and made this,...
Code: [Select]
  <html>
<head>
<style type="text/css">
div.img
{
  margin: 2px;
  border: 1px double black;
  height: auto;
  width: auto;
  float: left;
  text-align: center;
}
div.img img
{
  display: inline;
  margin: 15px;
  border: 1px dotted #ffffff;
}
div.img a:hover img {border: 1px dashed coral;}
div.desc
{
  text-align: center;
  font-weight: normal;
  width: 120px;
  margin: 2px;
}
</style>
</head>
<body>

<div class="img">
 <a target="_blank" href="smfsupport.com"><img src="http://i1140.photobucket.com/albums/n566/GarryRicketson/ghost2.gif" alt="Klematis" width="110" height="90" /></a>
 <div class="desc">This is the Ghost for a Pac Man Game I am working on </div>
</div>
</body>
</html>
 
Note, although most every one probably know this, you don't have to use a web site, to see how this looks or works, just copy the code, paste it into note pad, or what ever editor, save it as a    anyname.html  instead of a text file,and run it with your browser,...
from Garry