will the include funvtion of css works inside <div> of css?

Member Avatar for diafol

What do you mean?
If you want to dynamically introduce php invoked css rules, do it in a style tag or use it to write a <link /> tag.

if(...){
  echo '<link href="main.css" rel="stylesheet" rev="stylesheet" type="text/css" media="all" />';
}

or

<style>
  .myclass{
     color: <?php echo $colour;?>;
  }

</style>

Is that what you mean?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.