style links in php table
I have an iframe that displays 开发者_Python百科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
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.
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....
?>
精彩评论