2 Replies - 1490 Views - Last Post: 28 February 2013 - 04:30 AM

#1 InVaSiOn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 22-February 13

Frame background color change using CSS

Posted 27 February 2013 - 08:28 AM

Is it possible to change the background color of frame_b from within frame_a using CSS? For example you click on a button in frame_a and the background of frame_b goes blue.


<HTML>
<HEAD>
<TITLE>Test</TITLE>
<frameset cols="50%,50%">
  <frame src="frame_a.html">
  <frame src="frame_b.html">
</frameset> 
</HEAD>  
</HTML>

<HTML>
<HEAD>
<TITLE>frame_a</TITLE>

<input type="image" src="Blue.png" alt="blue button"> //Activate the style one frame_b

</HEAD>  
</HTML>


<HTML>
<HEAD>
<TITLE>frame_b</TITLE>

body
{
   background-color: blue;
}

</HEAD>  

</HTML>



Is This A Good Question/Topic? 0
  • +

Replies To: Frame background color change using CSS

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 4138
  • View blog
  • Posts: 13,073
  • Joined: 08-June 10

Re: Frame background color change using CSS

Posted 27 February 2013 - 08:30 AM

no. since frame_a, frame_b and the parent page are three independent HTML documents.

you might get it working via Java​Script but then it’s probably easier to not use frames in the first place.

This post has been edited by Dormilich: 27 February 2013 - 08:31 AM

Was This Post Helpful? 0
  • +
  • -

#3 InVaSiOn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 22-February 13

Re: Frame background color change using CSS

Posted 28 February 2013 - 04:30 AM

Thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1