Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-30-2011, 11:33 PM   #1
NaughtyVisions
Confirmed User
 
NaughtyVisions's Avatar
 
Join Date: May 2008
Location: Pennsylvania
Posts: 4,204
CSS question

Ok, so I putting a page in an iframe from a completely different site. The content of this page is utilized on a bunch of different sites, so keeping it in one place so changes can be made once to apply to all domains is essential.

I'm trying to get the content of the page within the iframe to match the site I'm putting it on as far as text/link colors, etc.

So, I'm thinking I have to put the iframe in a div id, and in my css file, actually associate the page being pulled, so that way customization I apply in my css will actually affect the contents in the iframe.

So here is what I'm thinking for the actual page on the domain:

Code:
<iframe scrolling="auto" allowtransparency="true" frameborder="0" height="225px" width="720px">
<div id="whatever">
</div>
 </iframe>
My problem is how to actually pull the "pathtomycode.html" page in my css file.

I know this is not right, but something like:

Code:
div#whatever {http://pathtomycode}
Am I like way fucking off here? What's the easiest way to do this?

I'm finally trying to get off of just basic html coding and on to stuff that was only outdated 5 years ago instead of 10.
__________________
Online strip gaming with sexy gamer girls
Best thing I ever signed up for: Quality Razors, Cheap Price
NaughtyVisions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-30-2011, 11:48 PM   #2
barcodes
Confirmed User
 
barcodes's Avatar
 
Industry Role:
Join Date: Mar 2011
Location: Florida
Posts: 2,040
just to verify, you have a page on your server that you would like to duplicate on other sites but change the colors, sizes etc via css right? or is it a page from another website?

Edit: Can you modify the page in the iframe is what am trying to ask. sorry, a bit sleepy

Last edited by barcodes; 12-30-2011 at 11:56 PM..
barcodes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 12:04 AM   #3
barcodes
Confirmed User
 
barcodes's Avatar
 
Industry Role:
Join Date: Mar 2011
Location: Florida
Posts: 2,040
Here is a very simple example. I would out the css in my main stylesheet but put it on the main page for simplicity.

Lets say you have mainpage.php and textpage.php.

Your mainpage.php could be something like this:
Code:
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test page</title>
<style type="text/css">
#frameStyle .titles {
	font-weight:bold:
	color: #F00;
}
#frameStyle .copy{
	color: #cc0;
}
</style>
</head>

<body>

<?php include 'test.php'?>

</body>
</html>
And the textpage.php could be something like this:
Code:
<div id="frameStyle">
<div class="titles">title for your page</div>
<div class="copy">copy for the page</div>
</div>
If you dont want to make classes for everything you can do it by the format tags, #framestyle h1 or #framestyle p for example. The example is done on php but you could do it with coldfusion
Code:
<cfinclude template="textpage.cfm">
asp
Code:
<!--#include file="textpage.inc"-->
etc...

This is assuming you can add the proper ids and classes to the content page you want to include in your various sites.
Best of luck

Last edited by barcodes; 12-31-2011 at 12:07 AM..
barcodes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 12:06 AM   #4
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
You're going to run into same origin issues trying to style the content of a page loaded from another domain. It may appear to work in some versions of some browsers, but the trend is toward stricter controls on cross domain access.

You can use jquery to pull it into your domain:

<html> <header> <script src="/js/jquery.js" type="text/javascript"> </header> <body> <div id='include-from-outside'></div> <script type='text/ javascript'> $('#include-from-outside').load('http:// example.com/included.html'); </script> </body> </html>

In a noscript stanza you can put the unstyled iframe or iframe a copy pulled to your server periodically.

Last edited by raymor; 12-31-2011 at 12:11 AM..
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 12:07 AM   #5
NaughtyVisions
Confirmed User
 
NaughtyVisions's Avatar
 
Join Date: May 2008
Location: Pennsylvania
Posts: 4,204
In a nutshell, it's a "warning blurb" that the person I'm doing some stuff for has on all of her sites. The warning itself is an html page that is hosted on one of her domains. She has it in a iframe on a bunch of her sites, but they all have the default color scheme from the site that the warning.html page is hosted on. I'm putting it on a site I re-vamped, and want the text/link colors in that file to match the site I re-vamped, not the one it's hosted on.

I made the iframe transparant, but short of copying the file onto the domain I re-vamped and hosting it there, I was told by someone else to code it into the CSS file, which I'm at a loss for. I'd just put it on the domain I revamped and pull it from there, but should the master file get changed elsewhere, I won't get those changes on the new site.


Edit: Just saw the replies...reading now...
__________________
Online strip gaming with sexy gamer girls
Best thing I ever signed up for: Quality Razors, Cheap Price

Last edited by NaughtyVisions; 12-31-2011 at 12:08 AM..
NaughtyVisions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 12:10 AM   #6
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by NaughtyVisions View Post
The warning itself is an html page that is hosted on one of her domains. She has it in a iframe on a bunch of her sites, but they all have the default color scheme from the site that the warning.html page is hosted on. I'm putting it on a site I re-vamped, and want the text/link colors in that file to match the site I re-vamped, not the one it's hosted on.
In that case what you need are symlinks, so foo.com/httpdocs/iframe.html is the same file as bar.com/httpdocs/iframe.html

iframe.html can reference style.css and it'll use style.css from the current site.
__________________
For historical display only. This information is not current:
support&#64;bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 12:11 AM   #7
barcodes
Confirmed User
 
barcodes's Avatar
 
Industry Role:
Join Date: Mar 2011
Location: Florida
Posts: 2,040
Ah, sorry. Without the details I may have misunderstood what you were going for.
I am sure raymor knows more about the warning page stuf than I would =D

good luck with it!

Last edited by barcodes; 12-31-2011 at 12:13 AM..
barcodes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 12:17 AM   #8
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by barcodes View Post
Ah, sorry. Without the details I may have misunderstood what you were going for. I am sure raymor knows more about the warning page stuf than I would =D

good luck with it!
I think your PHP method is a good way to go. Assuming of course you're not using safe mode, which you should not so long as safe mode stupidly implies suexec. (That's so dumb that "safe" mode requires "stupidly dangerous mode".)

Also assuming the pages use other PHP - at least until PHP 6.0 comes out I tend away from needlessly executing all documents as programs.
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 12:34 AM   #9
The Truth Hurts
Zph7YXfjMhg
 
The Truth Hurts's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: In Your Skull
Posts: 15,274
you can't do what you're asking, the way you're asking.
even if you trick it into working with js/jquery it would raise security warnings in certain browsers because if cross frame scripting.

just make your own duplicate of the iframe on the same domain or take the content of the iframe and stick it inline.
then style it however the hell you want.
The Truth Hurts is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2011, 09:42 PM   #10
Mr Pheer
Confirmed User
 
Industry Role:
Join Date: Dec 2002
Posts: 20,887
Try doing it as a php include.
Mr Pheer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-01-2012, 12:17 AM   #11
misterhhs
Confirmed User
 
Join Date: Oct 2005
Posts: 165
Read the file in php with fopen, filegetcontents...and print it out on your page. But I don't know if crossdomain is allowed.
misterhhs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.