Dynadot โ€” .com Transfer

CSS Styles and IFRAMES problem...

SpaceshipSpaceship
Watch
Impact
0
When including an html source file in an IFRAME tag, it doesn't retain the CSS styles that it does if you view the source file separately.

It doesn't seem to take on the CSS Style of the current document either, nor can you tell is to use any particular styles as per the 'STYLE' attribute inside the tag (since it only refers to the actual border properties of the IFRAME).

Does anybody know a way aorund this...i.e. a way of making it work?!!! HELP!

Thanks in advance.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Is the webpage in the iframe your own or from another site?
 
0
•••
CSS styles don't carry over on frames.

My suggestion is to put all your CSS in one file, then reference that file from each of the HTML pages you want to use that style sheet.

Code:
So if your CSS file is named "layout.css", 
you would put something like this in your html files

<LINK REL="STYLESHEET" TYPE="text/css" HREF="layout.css">
You could also copy your CSS from one file to the other (keeping it inline) but then any changes require modifying multiple files.

Hope this helps.
-Nitro
 
0
•••
Hello,

This is what you need to do. Open up the source file of your iframe. Now add the following between your closing title tag and the closing header tag.

<style type="text/css" media="screen">

<!--Place all your CSS coding that was in the CSS file that you had linked to this page, in here-->

</style>

So the top part of the webpage (this is the webpage that is used as the source for your iframe) would look like the following.

<html>
<head>
<title>The Use Of CSS With Text</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">

body {margin-left:15%;
margin-right15%;}

p {font-weight:bold;}

</style>
</head>

<body>

Now the CSS will be different of course, but that's how you need to have it (structure wise). That should fix everything!

God bless,
David
 
0
•••
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back