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

Google search

  • Hi everyone...wots up.

    1st of i know chris has done a vid already on google search box but im having a bit or trouble !

    Ok so i have manages to do the actual search box ok and have got it in the right position, but then when i try and do the results page it doesnt go to where i want it.

    So the results for the search is on a different page and i have put the results in so it should come up in the left col div, but it still appears in the right. Also how would i go about changing the result page so it fits into the left col div ?

    Here is the link.

    www.footballsmylife.com

    Its prob something very simple....but its doing my head in.

    Cheers
  • From the look of it, your source code states that your Google Search Code is placed in your right column. I dont think this is a CSS issue, but just misplacement of the html/js code that google provides~
  • doh....forgot to update server :o

    How do i go about changing the width and height then ? Ive tried putting height: 600px and width: 525px and adoesnt seem to work. Im trying to do it so it just fits perfect in the left col :(

    As i said before it prob a simple thing but my skills are very limited !!
  • The extra width is coming from Google's iframe which is set to 795px. I can change it in Firebug but I'm not sure if Google gives you the option to customise it. Best check the Google documentation.
  • I've done this before on a recent project and this is what I did:

    Wrap the Google html code with another class name lets say .container

    <div class=\"container\">
    <!--Google code-->
    </div>
    css

    .container {
    width: 970px; /*--what ever you want--*/
    padding: 20px;
    overflow: hidden;
    }
  • Soh Tanaka you're a legend....cheers pal