Applying a CSS style within PHP code

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 18, 2014   (RSS)

By Mikey - September 15, 2014

I'm trying to apply a CSS style within a line of PHP code, but haven't had any luck. Anyone have any suggestions?

This is my line of code:

<?php sc_displayCountryField('billing_country', 'billing_province'); ?>

This is one of my attempts which shows what I'm trying to do:

 <?php sc_displayCountryField('billing_country', 'billing_province', 'class="dropdown-form"'); ?>

Here's another attempt that produced no results:

 <?php 
$sc_displayCountryFields = sc_displayCountryField('billing_country', 'billing_province');
echo '<div class="dropdown-form">' . $sc_displayCountryFields . '</div>';
 ?>

Any suggestions would be appreciated,

Zicky

By claire - September 18, 2014

Hey Zicky

This is just HTML, not CSS. Are you seeing any div being output on the screen at all where this code is placed?

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Mikey - September 18, 2014

Hey Claire,

I've got this worked out will a little help from Greg.

Thanks, Zicky