The Conveyor Belt Slideshow is great ... and I thank you.
//Specify gap between each image (use HTML):
var imagegap=" "
When I put a "2" there, the 2 is visible. What does it mean by 'use HTML' for the pixel number?
Thanks,
LinK
The Conveyor Belt Slideshow is great ... and I thank you.
//Specify gap between each image (use HTML):
var imagegap=" "
When I put a "2" there, the 2 is visible. What does it mean by 'use HTML' for the pixel number?
Thanks,
LinK
It means use HTML. Like:or:HTML Code:<table style=border-collapse:collapse;border:0><tr><td width=2px> </td></tr></table>
that one requires spacer.gif which can be transparent or any color you like. Or:HTML Code:<img src=spacer.gif width=2px height=1px>HTML Code:<span>~</span>
Thanks for your help. I tried the image like this (below)
//Specify gap between each image (use HTML):
var imagegap="<img src="pxl_clear.gif" width="2" height="1">"
With a spacer image pxl_clear.gif in my main directory
and then the slideshow didn't appear at all!
So I tried:
var imagegap="<span>2</span>" and the '2' shows between the pictures.
Removing the " " removes the slideshow too.
Thanks,
LinK
This won't work because you have unescaped double quotes (") in it. I said to do it like:Originally Posted by link
Notice the difference? You can use your method but, escape the double quotes:Originally Posted by jscheuer1
like that. This should work too:Code:var imagegap="<img src=\"pxl_clear.gif\" width=\"2\" height=\"1\">"Here I just changed the string delimiters to single quotes ('). Also, depending upon your !DOCTYPE, if any, you may need to use the px designation for the dimensions.Code:var imagegap='<img src="pxl_clear.gif" width="2" height="1">'
Last edited by jscheuer1; 04-06-2005 at 04:37 PM.
However, the units must be omitted, and it would be better to include some form of quotation, especially should the introduction of path information become necessary.Originally Posted by jscheuer1
It's also acceptable to use single quotes for attribute values, soThis should work too:Here I just changed the string delimiters to single quotes (').Code:var imagegap='<img src="pxl_clear.gif" width="2" height="1">'
is also fine. However, spacer images are horrible hacks and should be avoided. It would be better to style the necessary padding.Code:var imagegap = "<img src='pxl_clear.gif' width='2' height='1'>";
Units are only necessary in CSS declarations. In that situation, units must always be specified, irrespective of DOCTYPE (or lack thereof). In HTML attributes, length values are always pixels or percentages. The latter is indicated with a percentage symbol (%). Multilength values (used by the cols and rows attributes of the frameset element, and the width attribute of the col and colgroup elements) also allows relative lengths, indicated with an asterisk (*).Also, depending upon your !DOCTYPE, if any, you may need to use the px designation for the dimensions.
Mike
Mike, Mike, Mike, mmmmm Why must units be omitted? It is valid HTML. I think this falls into the category of risking confusing the OP.
To Link:
Although what Mike (mwinter) says is probably technically correct, if it is over your head you can safely ignore all of it except the part about not using px. That may or may not cause a problem. I doubt that it will but, if Mike says it will, it might. I don't want to take the time to test it just now.
As I said, they're prespecified. Consider:Originally Posted by jscheuer1
If units were respected, the text would span about 60% of the width of Firefox using my settings. However, Firefox ignores it completely and spans the entire width. IE and Opera ignore the unit specifier and treats the number as a pixel value, so the text is compressed into the left-hand edge.Code:<table width="40em"> <tr> <td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam consectetuer massa eu lectus eleifend malesuada. Etiam rutrum arcu sed justo mattis porttitor. Pellentesque tempus, diam et ornare ornare, massa arcu adipiscing sem, vitae porttitor wisi quam sed lacus. Integer in eros. Ut in arcu at nunc volutpat interdum. Sed ornare egestas wisi. Nullam vestibulum lorem eget dui. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam luctus enim nec purus. Aliquam blandit aliquam magna. Integer varius nulla sit amet elit. Aliquam dignissim odio vel dui. Donec tortor sapien, venenatis ut, auctor et, mattis sed, augue.</td> </tr> </table>
No, it isn't.It is valid HTML.
Perhaps, so I'll make it clear:I think this falls into the category of risking confusing the OP.
If you use a HTML attribute, such as width, to set the dimensions of an element, no unit values are necessary. If the value is a number, it will always be assumed to be in pixels.
If you use a CSS property, either in a style sheet or a style attribute, you must always specify a unit.
Mike
Bookmarks