jquery - Cannot affect css worth a darn -


i'm new foundation , jquery selectbox. said, have wasted night trying accomplish simple task , virtually no results @ all.

i have html:

<!--  top nav --> <div class="nav row">     <div class="small-3 columns">         <select id="team" name="team">             <option value="volvo">volvo</option>             <option value="saab">saab</option>             <option value="mercedes">mercedes</option>             <option value="audi">audi</option>         </select>     </div>     <div class="gear small-1 columns">         <a href="#"><img id="teamsettingsgear" src="/images/settings.png" alt="team settings" /></a>     </div>     <div class="small-3 columns">         <select id="site" name="site">             <option value="red">red</option>             <option value="blue">blue</option>             <option value="green">green</option>             <option value="yellow">yellow</option>         </select>        </div>     <div class="gear small-1 columns">           <a href="#"><img id="sitesettingsgear" src="/images/settings.png" alt="site settings" /></a>     </div>     <div class="small-3 columns">         <select id="info" name="info">             <option value="volvo">volvo</option>             <option value="saab">saab</option>             <option value="mercedes">mercedes</option>             <option value="audi">audi</option>         </select>        </div>     <div class="gear small-1 columns">         <a href="#"><img id="informationgear" src="/images/settings.png" alt="information" /></a>        </div> </div> 

it's using both foundation 4 , jquery plugin called selectbox ivanov.

here attendant css:

.header, .help, .content, .footer { padding-top: 10px; }   .content { height: 500px; }  .inventory, .multipurpose, .cart { text-align: center; }  .nav { position: relative; top: -15px; }  .gear { padding-left: 0px !important; margin-left: 0px !important; } 

all want have gear float right of select box, maybe 10px in between.

if put selectbox , gear image in same div, gear image gets put on next 'line' down.

if mess position: relative; left: -whatever, gear move closer select box, because it's responsive css toolkit, have widen browser space them out again. conversely, if shrink browser window, gear floats on select box.

you don't need add additional styles align image dropdown using foundation. remember if put 2 elements in row in each column float right of each other. try removing of styles positioning , leave have additional padding or margin. this fiddle shows how accomplish it.

for mobile view, remember lot of mobile devices small, can have users using 240x400 devices. cater small devices have split columns will responsive , not tuck them in 1 row. sample below in fiddle shows how can accomplish it. of course can change 8 , 4 combination suit need. that's idea on how can present elements on small devices.

<div class="nav row">     <div class="small-8 large-3 columns">         <select id="team" name="team">             <option value="volvo">volvo</option>             <option value="saab">saab</option>             <option value="mercedes">mercedes</option>             <option value="audi">audi</option>         </select>     </div>     <div class="gear small-4 large-1 columns">         <a href="#"><img id="teamsettingsgear" src="img/gear.png" alt="team settings" /></a>     </div>     <div class="small-8 large-3  columns">         <select id="site" name="site">             <option value="red">red</option>             <option value="blue">blue</option>             <option value="green">green</option>             <option value="yellow">yellow</option>         </select>        </div>     <div class="gear small-4 large-1 columns">           <a href="#"><img id="sitesettingsgear" src="img/gear.png" alt="site settings" /></a>     </div>     <div class="small-8 large-3 columns">         <select id="info" name="info">             <option value="volvo">volvo</option>             <option value="saab">saab</option>             <option value="mercedes">mercedes</option>             <option value="audi">audi</option>         </select>        </div>     <div class="gear small-4 large-1 columns">         <a href="#"><img id="informationgear" src="img/gear.png" alt="information" /></a>        </div> </div> 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -