... and I get a few pixels worth of space between each image. If I delete the carriage return between each IMG tag, the space goes away, but I've got 19 images in there and having them all on one line will be a pain to read. Giving them margins of 0 doesn't help.
Additionally, every other image is smaller vertically and they all drop to the bottom of the DIV. Am I going to have to position each image absolutely?
Ugh ... it's like learning HTML all over again with these damn things. With tables, I could do what I want in a matter of minutes and not worry about it.
I remember now discovering that quirk several years ago. I've been avoiding it out of habit and I guess I assumed it had worked itself out by now.
Slime's trick works for the spacing -- never would have thought of that.
As for the vertical positioning, I fixed it with a bottom margin (and top just to be sure). Still not sure why it was aligning at the bottom, though. Is this normal? (And did I fix it safely? Seems to test OK.)
It looks fine, but now that I see what you're doing (and have taken a look at your code), I think there is a far more efficient way to accomplish this. What I would do is format the images as a list, and then use the arrow graphic in place of the default bullets. This would eliminate a lot of extra code, and you wouldn't have to worry about aligning the arrows vertically. For the first image in the series, you could just give it a special class with "list-style:none", thus eliminating the bullet (arrow graphic).
That's just the concept. If you decide to try it out and need a hand with the CSS, let me know.
From: Northumberland, England Insane since: Apr 2003
posted 12-01-2003 13:58
a lot of people have moaned about vertical aligning and how the css property for doing it isn't supported or doesn't work. Well it does work but you have to use it right and by right I mean that it is specifically aimed at aligning images. I was trying to find an example of it's use but the only thing I had ever used it for has been changed by my boss so I'm sorry about. If you have a look on the w3c site they should explain how to use it, it is a little tricky to get the hang of.
worth looking at tho.
although I think the unordered list idea is a better way to do it.
I added some rollover and visited effects which, I think, are pretty nifty. The faded visited effect is accomplished by offsetting a background image. (I can't take credit for that; I learned it somewhere else.)
However, to make it work equally well, with no elements shifting on hover, in IE6, Moz1, NN6 and Op7, it took some real hacking. And now when I try to add the arrows as the bullets, it just goes haywire and appears impossible to make all the effects work for everything without elements shifting in at least one of the browsers.
So, I think I'm going to go instead with osphactor's simple float:left solution and suffer the longer code. My question now is this:
Since I still want to use the shifting background image for my visited effect, I'm going to need to link a block-level element. Is it legal to do that? I mean, adding anchors outside a DIV or a P?
(Otherwise, I'll have to use a spacer, like <DIV><A><IMG spacer></A></DIV>, which I don't really want to do.)
[This message has been edited by Wes (edited 12-09-2003).]
It appears all I have to do is set my anchors, put nothing inside them, then apply display:block and set the size. I swear a tried this 10 minutes ago and it didn't work!
Now, I'd like to include some functionality to detect which page it's on and highlight the current page's thumbnail. I'm sure I'll be asking some questions in this thread, which I just realized is in the wrong forum.
Thanks for the help!
[This message has been edited by Wes (edited 12-11-2003).]
It looks nice. I'm just wondering about the spacing... how about another pixel or two on either side of the arrows, just to give them a little more breathing room? I can see the downside to that, though, since it would make the list (sorry, it's still a list in my mind) that much wider. Just a thought--not sure if it will actually work or not.
Unfortunately, I can't add anymore spacing because it's already squeezed in and I need the remaining few pixels for the "current" highlight I'm planning to add. I have, however, thought of sizing the thumbnails down just a bit, which would open up some room. I may give that shot ...
quote:Now, I'd like to include some functionality to detect which page it's on and highlight the current page's thumbnail.
Well, if you're okay with Javascript, go with the solution Slime explained in the other thread. There is a pure CSS solution, although I'm not sure if it's worth the trouble...
First, you give every one of your thumbnails a unique ID, like so:
ALA actually uses this method to highlight the appropriate button in the navigation bar, so that's where I got the idea. The Javascript solution may be simpler in your case, though.
Hmm ... I was going to use a technique I had used once before whereby I detected a substring of the URL, then I was going to switch the style. But I think I've left my templates flexible enough to stick something in the BODY tag unique to each page, so I might try that, thanks.