hello all i have that bit of js in my page.
i need to style the submit button, and am doing it w/css but when i change the size of the button it crowds out everything else.
& this is the full script
<script type="text/javascript">
$(document).ready(function(){
var f = $(document.createElement('form'));
var s = $(document.createElement('select'));
$('#country-selector-noscript a').each( function(i,e){
$(s).append('<option value="'+$(e).attr('href')+'">'+$(e).text()+'</option>');
});
$(f).submit(function(e){
//alert($('div.country-selector select').val());
document.location = $('div.country-selector select').val()+location.search;
return false;
});
$(f).append(s);
$(f).append($(document.createElement('input')).attr('type','submit').attr('value','\u00a0'));
$('div.country-selector').append(f);
});
</script>
how can i go about tweaking this so i can style the submit button shape & size?
thx
D
I tried even targeting the button specifically but when i change the width of the button to 50 it will resize also the width of the select element from 300 to 50. So i am missing something here…but not quite sure what to edit.
thx
D
ok awesome. thank you that worked. i had not understood that i was supposed to append to the script.
how can i keep styling the color etc by using the css stylesheet now.
i could keep appending other css rules but it seems that it would be easier & cleaner to do it trough the css?
Thank you again
D
The select being wiped out must be from something else you coded, because applying that CSS to just the submit button will have ZERO impact on your select… it applies only to the submit.
As usual, and I hate saying this because I’ve been told this many times, myself; no one can really help you without seeing your code.
EDIT: I just saw your edit.
The CSS should be affecting everything else. If you want to specify things specifically for the submit, then use input:submit{}, I think. I’m not well versed in CSS, myself.