开发者

style links in php table

开发者 https://www.devze.com 2022-12-09 18:46 出处:网络
I have an iframe that displays 开发者_Python百科a php page inside it when submitting a form from the html page.

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....

?>
0

精彩评论

暂无评论...
验证码 换一张
取 消