Something kooky going on with my layout when I use a Javascript function...

This is a discussion on "Something kooky going on with my layout when I use a Javascript function..." within the Web Page Design section. This forum, and the thread "Something kooky going on with my layout when I use a Javascript function... are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 28th, 2008, 13:15
Up'n'Coming Member
Join Date: Jul 2007
Location: UK
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Cool Something kooky going on with my layout when I use a Javascript function...

Hi!

I'm in the process of converting my old tables design to CSS and javascript, using a very similar method to another site I built from scratch.

Here is my new site:

http://www.jonathanmortimer.co.uk/te...o_graphic.html

The initial position of the description just below the image is more or less correct, however when I click on one of the thumbnail images below it shifts the description text down and I can't for the life of me figure out why. I'm employing a bit of javascript to replace the image and text, it worked perfectly in my other site and nothing is different in that part of the code as far as I can see.

Here is my other site:

http://www.jonathanmortimer.co.uk/nature/


Please help! I'm going up the wall with this one

Reply With Quote

  #2 (permalink)  
Old Mar 28th, 2008, 14:56
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 977
Blog Entries: 2
Thanks: 5
Thanked 19 Times in 17 Posts
Send a message via Skype™ to Aso
Re: Something kooky going on with my layout when I use a Javascript function...

Your site is severely broken in Firefox. It looks like you need to clear a float (which IE does incorrectly).

Back to the problem - as soon as you click on a thumbnail, you run a slice of Javascript. Somewhere in that code, it's generating another <p> within the current one (#description). So the result is doubled padding.
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #3 (permalink)  
Old Mar 28th, 2008, 15:44
Up'n'Coming Member
Join Date: Jul 2007
Location: UK
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Something kooky going on with my layout when I use a Javascript function...

Aaahhhhhh, thank you so much! It was just that little nudge in the right direction that I needed.

As for the CSS clear, obviously Safari doesn't do that right either (tsk, these browsers are SO inconsistent.. sometimes they're lapse, sometimes they're strict!) I had the clear in previously but removed it when trying to get some other aspect of it to work, Safari never complained.

Thanks again!
Reply With Quote
  #4 (permalink)  
Old Mar 28th, 2008, 16:13
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 977
Blog Entries: 2
Thanks: 5
Thanked 19 Times in 17 Posts
Send a message via Skype™ to Aso
Re: Something kooky going on with my layout when I use a Javascript function...

No worries!

HINT: Design for Firefox (and 99% of the time it's Opera, Safari and Camino ready) then fix IE (with conditional comments)
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript show/hide function danny322 JavaScript Forum 1 May 15th, 2008 12:46
add image src from javascript function ktsirig JavaScript Forum 1 Mar 14th, 2008 11:38
Help with must select at least one checkbox javascript function. anilreddy76 JavaScript Forum 5 Nov 29th, 2007 05:39
help with javascript function kinjiro JavaScript Forum 1 Nov 21st, 2003 15:58
calling a javascript function in from VBscript jakyra Classic ASP 2 Sep 22nd, 2003 23:13


All times are GMT. The time now is 03:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43