Results 1 to 4 of 4

Thread: Center align within Javascript

  1. #1
    Join Date
    Aug 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Center align within Javascript

    1) Script Title: Left-Right Image show

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ightslide2.htm

    3) Describe problem:
    Hi All,

    I have successfully run the Left-Right Image Show within our 3rd party application we use as our intranet. This 3rd party application is run on asp pages which we are not allowed to change. The left-right image show has been perfect as the only place I am able to insert script is within the <body> tags.

    My dilema is that the Show is Left aligned. I have tried adding the align option within <td></td> tags and also using '<div id="main2" style="position:relative;align:center;... both to no avail. The <td> throws the page out completely (being that the <tr> is assigned via the asp page).

    Is there any way the align function can be used within this javascript???

    Thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This may work:

    HTML Code:
    <div style="text-align:center;">
    <div style="width:100px;text-align:left;">
    slide show
    </div></div>
    Note: the width of the inner division should be the width of the slide show.

    With a page in standards mode, you can do this:

    HTML Code:
    <div style="width:100px;margin:0 auto;">
    slide show
    </div>
    But, from the way you described the situation, you may have no control over the mode of the page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you John

    It's worked brilliantly! Thank you so much John.

    I'm off to find out how to 'click to enlarge'.

    Thanks again.

  4. #4
    Join Date
    Aug 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default New Issue

    Hi Again,

    Well, after spending all day (AEST) trying to figure out how to create an enlarged image pop-up, again I am Lost. Obviously I can set it to link to target=_blank and have it display on another page however I really would like either a mouseover or click to enlarge and have it display on the same page.

    If anyone knows how this can be done just by using the <body> section that would be wonderful. If not, thanks for taking the time to read this.

    Cheers.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •