Jquery Mobile 1.4.2 CSS: Button styling without overridding jQuery css elements -


i noticing in jquery 1.4.2, styling items has become incredibly hard. appears if no longer able style other supplied jquery mobile css. example:

<input id="placelocationbutton" enableviewstate="true" onclick="click()" type="button" value="set location" class="map_button top_row_map_button" runat="server" data-inline="true" />  .top_row_map_button{     width: 15em !important; } 

it doesn't matter if make width 15 or 15,00000 button size not change until alter ui-btn class itself. makes styling single buttons impossible unless take jquery route, unideal. understand reason (the button styles applied in parent div created jquery mobile), there has way style button correct? doing wrong here?

edit other failed attempts:

<div class="top_row_map_button">     <input id="placelocationbutton" enableviewstate="true" onclick="clickgeocode()" type="button"         value="set location" class="map_button" runat="server" data-inline="true" /> </div>  .top_row_map_button:nth-child(2){     width: 15em !important; }  .top_row_map_button:nth-child(1){     width: 15em !important; }  .top_row_map_button {     width: 15em !important; } 

again, nothing unless style div element generated jquery mobile, cannot because not have access element before page loaded (unless style classes in css, trying avoid)

for find post in future ezanker provided solution (comments) using data-wrapper-class.

<input id="placelocationbutton" enableviewstate="true" onclick="click()" type="button" value="set location 1" data-inline="true" data-wrapper-class="top_row_map_button" />  .top_row_map_button {     width: 15em; } 

here fiddle.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -