Styling Country field drop downs

Richard_Wasylyn
Level 4 - Champion Alumni

Styling Country field drop downs

I'm wondering if there is an easy way to control the width and/or styling of drop down fields. We have our forms styled but the country fields aren't the same length as the other fields on the form. Is there an easy way to control this in Marketo or is this something we would have to do with our css?
Richard Wasylynchuk
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Styling Country field drop downs

You can use a HTML block to define a custom CSS or jQuery to override the original CSS.


jQuery: add a new class and then apply it to your inoput field:

$(document).ready(function() {
    $('input[type="text"]').addClass("idleField");
$('input[type="text"]').focus(function() {
$(this).removeClass("idleField").addClass("focusField");
        if (this.value == this.defaultValue){
        this.value = '';
    }
        if(this.value != this.defaultValue){
    this.select();
        }
    });
    $('input[type="text"]').blur(function() {
    $(this).removeClass("focusField").addClass("idleField");
        if ($.trim(this.value == '')){
        this.value = (this.defaultValue ? this.defaultValue : '');
    }
    });
});