Results 1 to 6 of 6

Thread: Display text with different colors next to buttons [swiss army slideshow]

  1. #1
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Display text with different colors next to buttons [swiss army slideshow]

    1) Script Title: Swiss army slideshow

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

    3) Describe problem: Great script! Works perfect and look really nice. I do have two little problems though when adjusting the script a bit.

    1. I would like to display the description of the image next to the previous and next buttons (who are located above the image). I tried it with the swiss_2.js, but then i get a blank page. Looks like swiss_2.js does not work with me :S Is there another way to do this?

    2. I would like to give de descriptions of the images color and change the font size, type. I can do this with basic CSS, but the thing is, I want different words different color and size.
    Example description: ´Section = Art - Fountain by M. Duchamp´. I would like ´Section=Art´ to be grey in a smaller font size in times new roman and ´Fountain Duchamp´ black, bigger font in Arial. Is this possible?

    Thanks very much in advance!

  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

    Using swiss_2.js is the way to go. Give me a link to the page that you have with swiss_2 and we'll figure out what the problem is.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I got swiss_2.js working! A certain table in my CSS was to small so the script did not fit where I wanted it to.

    I figured out how to get the text next to the buttons on top. But I can´t manage different text colors and sizes in the description text. Neither can I center the image in the middle of the page (but I thought that question was asked before here, so I´ll be browsing the forum).

    Unfortunally I cannot post a link to the slideshow, since it is not online yet. Where I am right now I do not have internet acces, exept for shady internet cafe´s where I am at now.

  4. #4
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Huray! Got almost everything working the way I like it. This script is great! Could anyone please help me out with the different text colors though? Whatever I do, it doesnt seem to work.

  5. #5
    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

    That may require some custom code. However, if you aren't using the description as title or alt (do not have either of these set):

    Code:
    slides#.use_alt=1; //use for descriptions as images alt attributes
    slides#.use_title=1; //use for descriptions as images title attributes
    Instead of like:

    Code:
    slides2[0] = ["photo6.jpg", "Section = Art - Fountain by M. Duchamp"];
    You can put regular markup in the description field and use style in a stylesheet to style it, example:

    Code:
    slides2[0] = ["photo6.jpg", '<span class="desc_sec">Section = Art</span> - <span class="desc_title_artist">Fountain</span> by <span class="desc_title_artist">M. Duchamp</span>'];
    Notice that the delimiters for the description are now single quotes (') so that double quotes (") may be used inside it.

    Then in your stylesheet you can have like:

    Code:
    .desc_sec {
    	font: normal smaller 'times new roman', serif;
    	color: gray;
    }
    .desc_title_artist {
    	font: bold 100% arial, sans-serif;
    	color: black;
    }
    - John
    ________________________

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

  6. #6
    Join Date
    Jan 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That did the job! As soon as the slideshow is online, I´ll post a link here. Thanks very much for the help:

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
  •