paulweb
06-14-2007, 06:27 PM
i developed an index page, then added an iframe.
i took out alot of the html from the page when i did so, and created a new file that contains the html i removed from the index page. (which i named index4_home.htm)
i set this new file as the src="index4_home.htm" value for my iframe src attribute.
this displays in the iframe, but now all my css is no longer working for all the html within my inframe.
how do i get my formerly working css to affect the src html of my iframe again?
i have tried giving an id to my iframe and changing the css to match.
for instance, before i took out my html from my index page an example of the css was:
----------------------------------------
div.parentContent {
width:757px;
height:404px;
margin:0;
padding:4px 0 0 0;
}
to match my html of <div class="parentContent">
-----------------------------------------
after i took out the html and created the index4_home.htm page, i gave an id name to my iframe:
-----------------------------------------
<iframe src="index4_home.htm" name="content" id="myiframe2" width="755" marginheight="0" marginwidth="0" height="100%" border="0" frameborder="0" scrolling="no"></iframe>
and changed my css to match:
#myiframe2 div.parentContent {
width:757px;
height:404px;
margin:0;
padding:4px 0 0 0;
}
-----------------------------------------
but no luck.
im assuming i can embed all my css in the top of the index4_home.htm page, but id rather avoid that and keep my external css file with all its declarations in one place...
any ideas?
i took out alot of the html from the page when i did so, and created a new file that contains the html i removed from the index page. (which i named index4_home.htm)
i set this new file as the src="index4_home.htm" value for my iframe src attribute.
this displays in the iframe, but now all my css is no longer working for all the html within my inframe.
how do i get my formerly working css to affect the src html of my iframe again?
i have tried giving an id to my iframe and changing the css to match.
for instance, before i took out my html from my index page an example of the css was:
----------------------------------------
div.parentContent {
width:757px;
height:404px;
margin:0;
padding:4px 0 0 0;
}
to match my html of <div class="parentContent">
-----------------------------------------
after i took out the html and created the index4_home.htm page, i gave an id name to my iframe:
-----------------------------------------
<iframe src="index4_home.htm" name="content" id="myiframe2" width="755" marginheight="0" marginwidth="0" height="100%" border="0" frameborder="0" scrolling="no"></iframe>
and changed my css to match:
#myiframe2 div.parentContent {
width:757px;
height:404px;
margin:0;
padding:4px 0 0 0;
}
-----------------------------------------
but no luck.
im assuming i can embed all my css in the top of the index4_home.htm page, but id rather avoid that and keep my external css file with all its declarations in one place...
any ideas?