Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kevindosi

macrumors regular
Original poster
Mar 16, 2006
191
0
I want to put a google latitude badge on my website. If you haven't seen it, it looks like this - Has the map on there and below it some text (location, time updated, etc). All of this is contained within an iframe. I don't want any of that text below, I just want the map. I was wondering if I can use CSS or some other method to get rid of this text. I was thinking of putting the iframe into a div with a fixed height, but that doesn't seem to do anything. Any suggestions? I'd really appreciate it.
 

kevindosi

macrumors regular
Original poster
Mar 16, 2006
191
0
Unfortunately I can't change the size of the iframe. If I do, it just shrinks down the content to fit inside. the code is:
HTML:
<iframe src="http://www.google.com/latitude/apps/badge/api?user=-3797161116671515245&type=iframe&maptype=roadmap" width="180" height="300" frameborder="0"></iframe>
Changing the iframe's height only makes it worse.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
Ah, so it sounds like the content of the iframe is set to 100% height. Along with wrapping the iframe with a div and giving it a height you'll also wan to set the overflow to hidden.
Code:
#wrapper {
 height: 280px;
 overflow: hidden;
}
This worked on a simple test case I did.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.