Changing the url a button links to, causes the button to move |
Changing the url a button links to, causes the button to move |
cgl102770 |
Sep 11 2014, 04:36 PM
Post
#1
|
Group: Members Posts: 4 Joined: 11-September 14 Member No.: 21,538 |
I'm working on www.cosatl.com. The "customer login" button currently links to another page on cosatl.com:
<li><a href="login_choices.php"><img src="img/login-off.jpg" alt="Login" width="130" height="32" /></a></li> They would like it to instead link to a different website entirely: <li><a href="http://shop.op247.com/8512/Login?"><img src="img/login-off.jpg" alt="Login" width="130" height="32" /></a></li> However, when I do that, it causes the button to move down, even though I did not change the buttons size or location: http://cosatl.com/index3.php I'm curious how to fix this? Thank you for any suggestions! |
pandy |
Sep 11 2014, 05:33 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Strange indeed. Even stranger, when I copied the page and viewed it locally the button was back where it should be.
Anyway, a change of URL can't possibly do this. It must be something else, but what? Also, I don't see the button drop in all browsers at your site either. But I did in the first one I tried and it doesn't happen locally in the same browser. |
pandy |
Sep 11 2014, 05:39 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Also, I don't see the button drop in all browsers at your site either. But I did in the first one I tried and it doesn't happen locally in the same browser. I do too. I mistakenly clicked the home button. Didn't notice this is a test page. I see it in all browsers I've tried, including my antique version of IE. |
pandy |
Sep 11 2014, 05:55 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
OK, disabling JavaScript puts the button back in place. So what is JavaScript up to that it can't do when I view the page locally, I wonder? I can't see any difference regarding what's on the page.
The floated button drops because there isn't room for it. I have to make #wrapper a good bit wider to make it go back, so JS must add something to the menu that it doesn't on the current home page. And Ajax is involved, I see. Oh my. |
cgl102770 |
Sep 11 2014, 06:05 PM
Post
#5
|
Group: Members Posts: 4 Joined: 11-September 14 Member No.: 21,538 |
Thank you so much for the replies. The cosatl.com nav bar is pulled from page_header.php file, I have the test page www.cosatl.com/index3.php pulling from page_header3.php, which is identical to page_header.php except for that one link Im trying to change.
I hope that makes sense, just trying to explain why the button only moves on one page. -he This post has been edited by cgl102770: Sep 11 2014, 06:06 PM |
cgl102770 |
Sep 11 2014, 06:08 PM
Post
#6
|
Group: Members Posts: 4 Joined: 11-September 14 Member No.: 21,538 |
Right, when I scale the button down about 15 pixels, it moves back up. I still dont understand though why changing the target url makes it move, though thank you for mentioning it could be a javascript thing.
|
pandy |
Sep 11 2014, 06:14 PM
Post
#7
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Yes, the HTML source is identical on both pages, at least as far as the menu goes. I didn't compare all of it. I also tried to change the URL for that button to a local one (local to your site, just 'login.php') with my browser's page inspector. It didn't make any difference. I was thinking if the Ajax stuff maybe did something to external URLs, but it doesn't seem so.
If you have a browser that lets you disable JS, do so and you'll see the button pup back up again. It is the JS, but I don't know what it's up to. Are you sure you just edited the URL? Nothing else, not even a line break? |
cgl102770 |
Sep 11 2014, 06:33 PM
Post
#8
|
Group: Members Posts: 4 Joined: 11-September 14 Member No.: 21,538 |
Thank you for asking. There is no line break, the links are in the code just as they are in the examples above...i just double checked.
|
Lo-Fi Version | Time is now: 16th April 2024 - 05:55 AM |