html - How do I use PHP to apply css properties? -
i want use php link css document's properties html would:
<link rel="stylesheet" href="mobile.css" type="text/css">
to specific, don't want import css file displays in between 2 css <style>
tags in html. want php apply properties css document.
i want php able work in if statement:
<?php if ($mobile == true) { //your solution here } ?>
thanks!
this you're asking for, isn't best practice , wouldn't recommend it. refer @nietonfir's suggestion (despite being little harsh, he/she right). doing mobile stuff in css part of responsive design (media queries) soooooo better , easier.
<?php if ($mobile == true){ echo '<link rel="stylesheet" href="mobile.css" type="text/css">'; } ?>
Comments
Post a Comment