Use css to position an iframe within a div?

Discussion in 'Web Design and Development' started by kevindosi, Jul 25, 2009.

  1. kevindosi macrumors regular

    Mar 16, 2006
    OK, So I would like to use a google latitude badge on my website. The only problem is that it's ugly and doesn't fit with my color scheme, plus it puts a bunch of text on the bottom that I don't want. The entire badge is actually an iframe. I put that iframe inside of a div with a limited height and overflow hidden so that you don't see all the garbage text at the bottom, but I still have a white frame around the map. I want to only show the map, with no white padding. Is there a way to move that iframe left and up inside of my div and further limit the width\height of the div to hide all the white padding? Here's an image of the badge if you don't know what it looks like. Any help would be much appreciated.

  2. angelwatt Moderator emeritus


    Aug 16, 2005
    Yup, you make can make use of relative positioning to do so. I'd have to see the HTML involved to give specific ideas.
  3. kevindosi thread starter macrumors regular

    Mar 16, 2006
    Ah of course, I had to use relative positioning when styling the iframe. Thanks a lot for the help. You can see it in action at

Share This Page