jquery - Am Using Yii,And I want to Style a DIV Element by defining the CSS properies on the View and then later save the CSS file -


I want that users have the capability of a parent div attribute style. By defining Diva colors, back-grounds, and other CSS properties with the interface of the WordPress theming dashbod. Nobody gives me the right direction.

If you want to enable the user to select custom settings, css option then you use cookies You can do this by doing so. You can try these steps 1. Change the extension of your CSS file to .php and add these lines to start this file

  & lt ;? Php header ("content-type: text / css;"); ? & Gt;  

Change the extension of this file to .php where you are using this.
2. Create a table with the same attributes, which you want to save the color, width, height settings.
3. After that you get the property in the main.php file query to get the properties

  Yii :: app () - & gt; Request-> Cookies ['BG1'] = New CHttpCookie ('nameOfattribute', 'Value From Database');  


4 Now sets the properties of the .php style file (the first CSS file) in the categories you have received from the cookie

 < Code> banner {background-color: & lt ;? Php echo $ _COOKIE ['bg1r']; ? & Gt ;; Width: 100%; Height: 436px; }  

And include the same category where you want it to be.
You can submit a form and take input from the user against these attributes and save them in the database table.


Comments