Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-03-2008, 09:21 AM   PM User | #1
harry.wiles
New to the CF scene

 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
harry.wiles is an unknown quantity at this point
Possible to crop an iframe?

Hi I run a very simple, 1 page, calendar site however I would like to crop the bottom of my google calendar iframe. This bottom bit contains the "+ google calendar button" which means competition can easily steal my content...

www.headfirstmusic.co.uk

Thanks to anyone that can help - Harry
harry.wiles is offline   Reply With Quote
Old 10-03-2008, 11:02 AM   PM User | #2
effpeetee
Senior Coder

 
effpeetee's Avatar
 
Join Date: Feb 2007
Location: Clapham Junction - London SW
Posts: 4,884
Thanks: 228
Thanked 204 Times in 203 Posts
effpeetee is an unknown quantity at this point
Try this site.

And this one.
Frank
__________________
* Sources (updated: 21.11.2012.
Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

Last edited by effpeetee; 10-03-2008 at 11:13 AM..
effpeetee is offline   Reply With Quote
Old 10-03-2008, 11:12 AM   PM User | #3
brazenskies
Regular Coder

 
Join Date: May 2008
Location: Oxford, UK
Posts: 422
Thanks: 14
Thanked 27 Times in 27 Posts
brazenskies is on a distinguished road
How will people steal your content? That button just prompts people to get their own google calendar does it not?

Are you actually just wanting to hide the fact that it's a google calendar to make people think you made it yourself?
brazenskies is offline   Reply With Quote
Old 10-03-2008, 11:32 AM   PM User | #4
harry.wiles
New to the CF scene

 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
harry.wiles is an unknown quantity at this point
the "+ google calendar" adds it as an overlay in anyone's google calendars page they can then export it and reimport it to another calendar...
harry.wiles is offline   Reply With Quote
Old 10-03-2008, 11:34 AM   PM User | #5
harry.wiles
New to the CF scene

 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
harry.wiles is an unknown quantity at this point
Thanks for your help frank -

The idea on the 2nd site doesn't seem to work with google calendar's iframe, as even when scroll bars are set to "no" or "0" they still occur. However the first idea sounds interested :

how do I "You can apply negative margins to the body element inside iframe."

Cheers!
harry.wiles is offline   Reply With Quote
Old 10-03-2008, 11:52 AM   PM User | #6
effpeetee
Senior Coder

 
effpeetee's Avatar
 
Join Date: Feb 2007
Location: Clapham Junction - London SW
Posts: 4,884
Thanks: 228
Thanked 204 Times in 203 Posts
effpeetee is an unknown quantity at this point
Have a look at this URL.
and this


This is from the first url..


Code:
Negative margins

The negative margins technique allows to center a block for which the dimensions are known.

Centering can be horizontal, vertical or both.

For a container block of 700 px by 400 px. We want it exactly centered within the navigator no matter the definition used (800x600, 1024x768 or more).

The trick is to first place this block at 50% top and 50% left, which will place the upper left corner of the block in the middle of the page.

Then we will define negative margins with a value that is exactly half of the width and height of the block, which will position it exactly in the middle of the page.

Here is the CSS code for the container:

#global {
     position:absolute;
     left: 50%; 
     top: 50%;
     width: 700px;
     height: 400px;
     margin-top: -200px; /* half of the height */
     margin-left: -350px; /* half of the width */
     border: 1px solid #000;
     }
Then place the container right below the <body> tag:

<div id="global"></div>
Now the block is centered.(View result here)

Note: Negative vertical margins in CSS seem to be causing problems on Explorer / Mac.

(Liberally inspired from http://bluerobot.com/web/css/center2.html)

Print article
Raphael GOETTER
www.alsacreations.com
__________________
* Sources (updated: 21.11.2012.
Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

Last edited by effpeetee; 10-03-2008 at 11:58 AM..
effpeetee is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:16 AM.


Advertisement
Log in to turn off these ads.