Recently i ran into to the situation to set inline styles to element on the page using html inputs,project is developed using CodeIgniter framework , for security reasons I had enabled XSS filtering Globally in application/config/config.php
$config['global_xss_filtering'] = TRUE;
Because of XSS Filtering inline Styles not worked, To overcome this situation i had manually disabled XSS Filtering.
$content= $this->input('content', FALSE);
The above line will override default config option (at config.php).