Make Php Code Into Css File?
I make a slider for my website, I make 3 pictures in CSS file code : but I want to take the last 3 posts from the database and make them in slider So, is there any method to make
Solution 1:
You wouldn't want to write the file references to a new .css file, better to echo them directly into a style tag like so:
</php
//PHP CODE
?>
<head>
<style>
.banner1{
background:url(<?php echo //FILE REFERENCE 1 ?>) no-repeat 0px 0px;
background-size:cover;
min-height:650px;
}
.banner2{
background:url(<?php echo //FILE REFERENCE 2 ?>) no-repeat 0px 0px;
background-size:cover;
min-height:650px;
}
.banner3{
background:url(<?php echo //FILE REFERENCE 3 ?>) no-repeat 0px 0px;
background-size:cover;
min-height:650px;
}
</head>
</style>
<?php
//MORE CODE
Post a Comment for "Make Php Code Into Css File?"