treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Floating a javascript Slideshow

  • Hi Everyone,

    I was wondering if someone could help me with a small problem I am having, I am trying to float two divs side by side, the left div is supposed to just be text and the right div is supposed to be a javascript slideshow. The only problem is that the slideshow has its own css and I can't get it to float to the right, it always appears below the left div. I have tried adding the the float: right line of css to every part of it's css as well as the main.css but it still wont work!

    You can have a look at the page here http://icedqueens.com/indexcss.html

    The slideshow css is here: http://icedqueens.com/css/slideshow.css

    And the main css is here: http://icedqueens.com/css/main-css.css

    Hopefully you guys will have some ideas on what to do,

    Thanks!
  • is the layout you are talking about a table layout? Coz I had to fix the link you have there...
  • "Robskiwarrior" said:
    is the layout you are talking about a table layout? Coz I had to fix the link you have there...


    The link I gave in the post is all in css but the live version on the website is done in tables. I'm trying to convert the whole website to css
  • For starters: there is no <align> element. so get rid of that - then your css links in the header should be reversed if you want to be able to override css from slideshow.css with main-css.css - also, make sure you're taking into account the inline css that the script is adding to your slideshow divs


    this is the generated source of your slideshow divs

    <div style=\"display: block; position: relative; z-index: 0;\" id=\"show\" class=\"slideshow\">
    <div style=\"overflow: hidden; display: block; height: 300px; position: relative; width: 350px;\" class=\"slideshow-images\"><a><img style=\"display: block; position: absolute; z-index: 36; height: 555px; visibility: visible; width: 370px; left: 0px; top: -199px; bottom: auto; right: auto; opacity: 1;\" src=\"examples/../images/2.jpg\" alt=\"Our Cupcakes\" width=\"400\" height=\"600\"></a><a><img style=\"display: block; position: absolute; z-index: 37; height: 777px; visibility: visible; width: 518px; left: auto; top: -9px; bottom: auto; right: 0px; opacity: 0.125985;\" src=\"examples/../images/3.jpg\" alt=\"Our Cupcakes\" width=\"400\" height=\"600\"></a><div style=\"visibility: hidden; opacity: 0; background-image: url(css/loader-3.png);\" class=\"slideshow-loader\"></div></div><div style=\"visibility: visible; opacity: 1;\" class=\"slideshow-controller\"><ul><li class=\"first\"><a title=\"First [Shift + Leftwards Arrow]\"></a></li><li class=\"prev\"><a class=\"active\" title=\"Prev [Leftwards Arrow]\"></a></li><li class=\"pause\"><a title=\"Play / Pause [P]\"></a></li><li class=\"next\"><a title=\"Next [Rightwards Arrow]\"></a></li><li class=\"last\"><a title=\"Last [Shift + Rightwards Arrow]\"></a></li></ul></div></div>



    In the end though, you've just misplaced a closing tag - I just achieved the effect in firebug by following these steps:
    1. remove the <align></align> tags
    2. move the </div> tag for #info from after #show to before #show, right after the info and the </strong> tag
  • "JRGould" said:
    For starters: there is no <align> element. so get rid of that - then your css links in the header should be reversed if you want to be able to override css from slideshow.css with main-css.css - also, make sure you're taking into account the inline css that the script is adding to your slideshow divs


    this is the generated source of your slideshow divs

    <div style=\"display: block; position: relative; z-index: 0;\" id=\"show\" class=\"slideshow\">
    <div style=\"overflow: hidden; display: block; height: 300px; position: relative; width: 350px;\" class=\"slideshow-images\"><a><img style=\"display: block; position: absolute; z-index: 36; height: 555px; visibility: visible; width: 370px; left: 0px; top: -199px; bottom: auto; right: auto; opacity: 1;\" src=\"examples/../images/2.jpg\" alt=\"Our Cupcakes\" width=\"400\" height=\"600\"></a><a><img style=\"display: block; position: absolute; z-index: 37; height: 777px; visibility: visible; width: 518px; left: auto; top: -9px; bottom: auto; right: 0px; opacity: 0.125985;\" src=\"examples/../images/3.jpg\" alt=\"Our Cupcakes\" width=\"400\" height=\"600\"></a><div style=\"visibility: hidden; opacity: 0; background-image: url(css/loader-3.png);\" class=\"slideshow-loader\"></div></div><div style=\"visibility: visible; opacity: 1;\" class=\"slideshow-controller\"><ul><li class=\"first\"><a title=\"First [Shift + Leftwards Arrow]\"></a></li><li class=\"prev\"><a class=\"active\" title=\"Prev [Leftwards Arrow]\"></a></li><li class=\"pause\"><a title=\"Play / Pause [P]\"></a></li><li class=\"next\"><a title=\"Next [Rightwards Arrow]\"></a></li><li class=\"last\"><a title=\"Last [Shift + Rightwards Arrow]\"></a></li></ul></div></div>



    In the end though, you've just misplaced a closing tag - I just achieved the effect in firebug by following these steps:
    1. remove the <align></align> tags
    2. move the </div> tag for #info from after #show to before #show, right after the info and the </strong> tag



    It worked,Thank you so much! You're complete lifesaver :D I cant believe it was that simple :P
  • Glad I could help - I get a sick pleasure out of debugging... :p