By the way, the distance between images increased, whit that style you provided, thanks for that!
Printable View
By the way, the distance between images increased, whit that style you provided, thanks for that!
That's invalid HTML. You can't have a head after a display element like a table cell. However, some browsers may ignore that. But the real problem is:
What do you think valign="top" means? That is what is 'pushing things up'.HTML Code:<td colspan="2" valign="top">
Now, in general, your page should be organized like so:
With only one of each of the above tags in it. Things like tables, divisions and paragraphs go in the body, style in the head and scripts can go either place but usually belong in one place or the other according to their installation instructions.HTML Code:DOCTYPE
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
You can ignore these basic rules of organization if you like. But, many browsers will not render your page if you do.
Thanks a lot for reply!!
Now about valign =top - i have a header and a footer on my website, everything in between is in the table with valign=top. I tried to change it to "middle", but pictures are still jumping to the top!!! Now inside that table i have another table --> thats where the actual gallery goes, and vaign =middle should align everything in that table to the middle ( it does except gallery!).
Regarding the <head> section - i was allready told that its illegal, but i need to load certain java scripts for certain pages. Now i could do all that in my "header" <head> -but then it would be overloaded with unnecessary scripts which would load every time. So i decided to have another <head> to load scripts on demand -- i've seen they do it on some websites. Is there any better way?
But the main question still stands, it looks like gallery does not obey table alignment rules, smething still pushing it to the top:(
Thanks again
Sounds like you have a very non-standard page, a very non-standard site in fact. I think to be of any further help I would need a link to the page in question.
BTW, many scripts that say that they belong in the head can go in the body of a page. In fact, if a page with two heads, one in the proper location and one in the body works, then the second 'head' is not a head at all but, just a typo or a misguided effort. Those extra <head></head> tags could be skipped and everything would work as well as it does without them. Further, if a script that is supposed to go in the head will work in the body section, it would be best to put it as close to the top of the body section as possible. It will work the best there.
Hey John,i folowed your advice and removed extra <head>, script seems to work fine, so i live it like that for now.
Now about the picture gallery, i removed header and footer, tried absolutely everything to align the gallery, no luck. Here is a stripped version of the page
http://www.netops-performance.com/He...p?device_id=10
there in no usual <html><head>... blabla, all of that is in the header, so if you could take a look and say what u think is wrong, thanks again, u are of a great help.
I think I misunderstood your original requirements. In the past whenever vertical centering of this script was requested, it was because the images were of different heights. On your example page, the images are all the same height. Since you are using a table with the display cell set to valign="middle", the content will be vertically centered, however it (the content) must be shorter than the td for this to be noticeable. I simply changed this (highlight red):
to the height of the images, and that took care of it. This height setting should always be the height of the tallest image plus twice the image border width (if any), no larger. If you decide to also use images of varying heights, then my previous suggestion of adding to gallerystyle.css:Code:<div id="motioncontainer" style="position:relative;width:400px;height:202px;overflow:hidden;">
should also be used.Code:#trueContainer img {
vertical-align:middle;
}