Taking note of the nav bar image above, which has been applied in a footer, fixed to the bottom of the page, I would like assistance with the following:
- Format the icons present above each button such that it's centered neatly (using CSS, ideally, but jQuery / jQuery Mobile is available therefore allowed)
- CLEAN UP MY CODE. I'm pretty sure there are briefer versions in both HTML and CSS of doing what I'm doing, as long as it's not cryptic, I would appreciate any help with cleaning up the code pasted below.
Icons are 24x24 and the following is the code used for HTML:
<div data-role="footer" data-position="fixed" data-tap-toggle="false">
<div id="navigation" data-role="controlgroup" data-type="horizontal" class="center">
<a href="#" data-role="button" data-iconpos="top" id="home" data-icon="custom">Home</a>
<a href="#" data-role="button" data-iconpos="top" id="powerSource" data-icon="custom">Power Sources</a>
<a href="#" data-role="button" data-iconpos="top" id="storage" data-icon="custom">Storage</a>
<a href="#" data-role="button" data-iconpos="top" id="tripAnalysis" data-icon="custom">Trip Analysis</a>
<a href="#" data-role="button" data-iconpos="top" id="tripManager" data-icon="custom">Trip Manager</a>
<a href="#" data-role="button" data-iconpos="top" id="warning" data-icon="custom">Warnings & Alarms</a>
<a href="#" data-role="button" data-iconpos="top" id="powerSys" data-icon="custom">Power Systems</a>
<a href="#" data-role="button" data-iconpos="top" id="settings" data-icon="custom">Settings</a>
</div>
</div> <!-- / footer -->
Following is the CSS I applied (scrounged it up from here and there and edited a good bit of it):
.ui-icon-custom {
width:30px !important;
height:25px !important;
margin-left:-15px !important;
}
.center {
text-align: center;
}
#home .ui-icon {
background-image: url(/images/icons/home.png);
background-repeat: no-repeat;
}
#powerSource .ui-icon {
background-image: url(/images/icons/powerSource.png);
background-repeat: no-repeat;
}
#storage .ui-icon {
background-image: url(/images/icons/storage.png);
background-repeat: no-repeat;
}
#tripAnalysis .ui-icon {
background-image: url(/images/icons/tripAnalysis.png);
background-repeat: no-repeat;
}
#tripManager .ui-icon {
background-image: url(/images/icons/tripManager.png);
background-repeat: no-repeat;
}
#warning .ui-icon {
background-image: url(/images/icons/warning.png);
background-repeat: no-repeat;
}
#powerSys .ui-icon {
background-image: url(/images/icons/powerSys.png);
background-repeat: no-repeat;
}
#settings .ui-icon {
background-image: url(/images/icons/settings.png);
background-repeat: no-repeat;
}