I want to develop a project with dynamic css file ,i mean i want to apply styles dynamically with out using static css file. I want to apply styles like colors, borders, width, heights etc..from one form fields and those are stored in database and i want to get values from database and apply changes dynamically in css file(styles), project css applied as dynamically.How can i write code in this scenario
.css file
#border
{
border: 30px;
}
#color
{
color: red;
}
like this... php form view
<h1 id='color'>hello world</h1>
<input type='text' id='border' value='hello'/>
i want my .css file like this
#border
{
border: <?= $settings[0]->border ?>;
}
#color
{
color: <?= $settings[0]->color ?>;
}
See Question&Answers more detail:os