tags:

views:

22

answers:

2

I have an iframe that displays a php page inside it when submitting a form from the html page.

Is it possible to style links with some php code? if so, how?

Thanks

+1  A: 

Just use PHP's echo to add some internal or inline CSS styles.

An example (using the "heredoc" syntax):

echo <<<END
<style type="text/css">
a:link { color: blue; text-decoration: none; }
a:visited { color: blue; text-decoration: none; }
a:hover { color: red; text-decoration: underline; }
a:active { color: red; text-decoration: underline; }
</style>
END;

Or something of that sort.

Donut
A: 

You would want to use css for this, not php, however you can parse it into your php file.

<?php

// code here....

?>
<style type="text/css">
iframe a {
  color:red;
}
</style>
<?php

// more code here....

?>
Alex Sexton