hyperhutch
09-23-2011, 03:36 PM
Hey all,
I am new to CSS coding (back in the day I used regular old HTML 4.0). I have been managing to figure most things out by web searches and trial and error, but I find myself fumbling around a lot and wasting tons of time.
I have had a website up for about a year now, and as I am trying to get an image gallery set up I don't know how to properly customize the free code I copied. Here's the URL of the test page and the current code.
Just click on the image and it will scroll through the images.
http://www.mhwoodart.com/gallerytest.html
<head>
<script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script>
</head>
<style>
/* root element for single scroll */
.scroll {
position:absolute;
overflow:hidden;
width: 300px;
height: 200px;
float:left;
}
/* root element for the scroll pics */
.scroll .pics {
width:200em;
position:absolute;
clear:both;
}
/* single scroll item */
.pics img {
float:left;
cursor:pointer;
width: 300px;
margin:0px;
}
/* possible settings for the active scroll */
.scroll.active {
}
</style>
<body style="margin:0;">
<table border=0 style="padding:0;border:1px solid #999;"><tr><td>
<!-- scroll #1 -->
<div class="scroll">
<div class="pics">
<img src="images/Available/HickoryNEBowl.jpg" />
<img src="images/Available/Plume.jpg" />
<img src="images/Available/ApplePlatter.jpg" />
</div>
</div>
</td></tr></table>
<br clear="all" />
<script>
// enable scrolls. a simple magical one liner
$(".scroll").scrollable({size: 1, loop: true});
</script>
</body>
As you can see on the test page the middle image is tall and narrow. It's set to resize to the full width of the table, but I need to resize it's height and keep its proportions. I know how to squash the image into the cell, but I don't know how to have it automatically resize. I have been having trouble finding useful coding tutorials using search engines, and that's probably because I don't exactly know what I need to search for.
Thanks!
Hyperhutch
I am new to CSS coding (back in the day I used regular old HTML 4.0). I have been managing to figure most things out by web searches and trial and error, but I find myself fumbling around a lot and wasting tons of time.
I have had a website up for about a year now, and as I am trying to get an image gallery set up I don't know how to properly customize the free code I copied. Here's the URL of the test page and the current code.
Just click on the image and it will scroll through the images.
http://www.mhwoodart.com/gallerytest.html
<head>
<script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script>
</head>
<style>
/* root element for single scroll */
.scroll {
position:absolute;
overflow:hidden;
width: 300px;
height: 200px;
float:left;
}
/* root element for the scroll pics */
.scroll .pics {
width:200em;
position:absolute;
clear:both;
}
/* single scroll item */
.pics img {
float:left;
cursor:pointer;
width: 300px;
margin:0px;
}
/* possible settings for the active scroll */
.scroll.active {
}
</style>
<body style="margin:0;">
<table border=0 style="padding:0;border:1px solid #999;"><tr><td>
<!-- scroll #1 -->
<div class="scroll">
<div class="pics">
<img src="images/Available/HickoryNEBowl.jpg" />
<img src="images/Available/Plume.jpg" />
<img src="images/Available/ApplePlatter.jpg" />
</div>
</div>
</td></tr></table>
<br clear="all" />
<script>
// enable scrolls. a simple magical one liner
$(".scroll").scrollable({size: 1, loop: true});
</script>
</body>
As you can see on the test page the middle image is tall and narrow. It's set to resize to the full width of the table, but I need to resize it's height and keep its proportions. I know how to squash the image into the cell, but I don't know how to have it automatically resize. I have been having trouble finding useful coding tutorials using search engines, and that's probably because I don't exactly know what I need to search for.
Thanks!
Hyperhutch