2

I have this code (CodeIgniter):

<tr>
    <td width="80">Gender*:</td>
    <td>
        <?php echo form_dropdown('gender', $gender_select, $gender_val); ?>
    </td>
    <td>
        <?php echo priv('gender',$profile_level['gender'])?>
    </td>                           
</tr>

Is it possible to have an inline CSS style inside the 'php line' to make its height or width be adjusted to any size I want?

3
  • It looks like you might be using a framework to generate the dropdown. Please specify which one so we can help with the syntax. Commented Jan 17, 2012 at 0:51
  • Wouldn't that be in the enclosing <td>? Or, in a relevant tag within form_dropdown, if that's a function you are able to change (say in the <input> or (if any) enclosing <div> tag). Commented Jan 17, 2012 at 0:51
  • im using codeigniter in this one..anyway thanks for those who replied, i got the solution earlier from @amccausl .:) Commented Jan 17, 2012 at 1:44

1 Answer 1

1

There is a forth argument of the function (assuming Codeigniter) which is a fragment of the tag

<?php echo form_dropdown('gender', $gender_select, $gender_val, 'style="font: 10px"'); ?>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.