PDA

View Full Version : Help with centering & top with an image ???



Collectors-info
12-24-2006, 08:10 PM
Hi, could someone help me with this pop up? I am trying to make the pop up image go to the center & if possible top of the page.
This is the lager pop up image that I am trying to center & top of the page if pos. http://www.collectors-info.com/cottage.jpg

This is the script.

<a href="#" onmouseover="rog1189766623.src='http://www.collectors-info.com/cottage.jpg'" onmouseout="rog1189766623.src='http://www.collectors-info.com/country-cottage.jpg'"><img src="http://www.collectors-info.com/country-cottage.jpg" name="rog1189766623" border="0"/></a>


Many thanks.

JSP
12-25-2006, 04:16 PM
Are you trying to center both graphics or just one?

I can center both, but not just one. To center both graphics, just use the center tag as shown below.

<center><a href="#" onmouseover="rog1189766623.src='http://www.collectors-info.com/cottage.jpg'" onmouseout="rog1189766623.src='http://www.collectors-info.com/country-cottage.jpg'"><img src="http://www.collectors-info.com/country-cottage.jpg" name="rog1189766623" border="0"/></a></center>

Unfortunately, I don't think there is a way to just center one of the graphics.

John

Collectors-info
12-25-2006, 06:21 PM
Are you trying to center both graphics or just one?

I can center both, but not just one. To center both graphics, just use the center tag as shown below.

<center><a href="#" onmouseover="rog1189766623.src='http://www.collectors-info.com/cottage.jpg'" onmouseout="rog1189766623.src='http://www.collectors-info.com/country-cottage.jpg'"><img src="http://www.collectors-info.com/country-cottage.jpg" name="rog1189766623" border="0"/></a></center>

Unfortunately, I don't think there is a way to just center one of the graphics.

John

Hi John, Just the larger one that pops up on mouse over. All works fine if i place the script on the left side of the page. But if i place it on the right, the image pops up half of the screen.
Its like its been told to justify to the right & I thought I may be able to center it, or instruct it to center?

Bethers
12-25-2006, 06:27 PM
Chris, did you try it with the center tag as he gave you? That would be the first thing I'd try.

Collectors-info
12-25-2006, 07:01 PM
Hi Beth, Yep, I have tried the center tag, I think just about every where.
I am sure there must be a way to do this?
Johns way will naturally center the image & the new pop up on roll over, but as he says, it centers both.
I may have to look at getting the images on the left of the page some how..

Bethers
12-25-2006, 07:22 PM
What page is that on?

Collectors-info
12-25-2006, 07:41 PM
This was the page I was messing around with http://www.collectors-info.com/cottage-rental.php but i have a few pages that are coming up that will have a lot of images via thumb nails that I hope to make work this way. The nice thing about the generator that makes this code, is that it gives every script a different code number to enable more than just one image to have this type of action on a page.
If you ever need it ? http://www.kreativrauschen.com/tools/roll-over-generator/

Sorry if I am a bit slow getting back! I am having that problem again with the email not wanting to login from home. I am not sure why we keep getting this problem.??? All other email account are ok. Its just the Vodahost ones i have problems with.

Bethers
12-25-2006, 08:36 PM
Chris,
I've been looking at your source code - and before I could even start to see about doing that - I ran into some things that could cause you major trouble with se's. First, you have two complete sets of meta on the page. I believe you are calling up your pages via php? If this is the case and you have your navigation or something called up this way - that page does not get meta - as it is going to be a part of the page it's on - you don't want to confuse the se's.

Also - there is this in your page code:
[quote]Why not have a weekend cottage break. You can have a collectors holiday &amp; a weekend cottage break.<BR>
We have thousands of cottages all over the brutish isles. We can even supply you with a travel map.
</quote>
This is not anywhere on the page - so I'm thinking you have it under another element? You need to find it and get rid of it - as right now it looks like cloaking text - which is a big no-no for se's.

As to why the other isn't centering how you want - is because you have put it into an element on the right - and that element has co-ordinates - so the larger picture IS centering in the element it is in. If you want to make that element the width of the page - then put the picutre to the right - so the rest of the element is under the rest - you might be able to get this to work. Otherwise, like you said, you could move it to the right.

Personally, I'd rather the picture be clickable to a popup - where it wouldn't then be covering anything on the rest of the page - and I could read the page and go back and forth to the picture. But that's a personal preference (and one reason I stick with the BV gallery feature :) )

Good luck.

Collectors-info
12-26-2006, 01:50 AM
Thanks Beth! I see the code you mean & must admit I never even noticed that. The booking part is an html insert. I will remember this on the rebuild.
I am going to go for all the colour panels in on the background using tables, they seemed to be a lot more friendly & quicker loading than the BV shapes/images.
IE: http://www.collectors-info.com/ltm_clone.html (looks just the same)
I have also noticed that sometimes the BV shapes donít always load, but have never had the problem with tables.
Think you maybe right on the gallery side of things & will give it a try.

Many thanks.