vBulletin Mobile Style - CSS Tips & Tricks
by
10 Mar 2011
With the release of vBulletin 4.1.2, we have available a Mobile Style! You can read more about that here: http://www.vbulletin.com/forum/content.php/428-New-vBulletin-4-Light-Mobile-Style Currently it's only compatible with the forum, meaning that no matter if you own the vBulletin Suite or vBulletin Forum Classic you can only use this for the forum at the moment however CMS and Blog versions are in development. Now I've seen some posts already asking how to customize? Example: index.php?t=258994 Now what have I figured out?
What else Michael? - Well simple, I've found out there's no additional.css included by default which disappointed me slightly although do you truly need it? I say if you plan on customizing then yes if not then no worries! Now we can go about making a few changes to sort all this out but there's several ways ready to see them? Method 1 Edit Mobile file accordingly or simply add in additional.css so it's parsed. You can add it in very quickly by editing the template headinclude Find: Code:
<vb:if condition="$vboptions['storecssasfile']"> {vb:cssfile main-rollup.css} {vb:raw template_hook.custom_css_links} <vb:else /> {vb:cssfile bbcode.css,editor.css,popupmenu.css,reset-fonts.css,vbulletin.css,vbulletin-chrome.css,vbulletin-formcontrols.css{vb:raw template_hook.custom_css_list}} </vb:if> Add under: Code:
{vb:cssfile additional.css} Method 2 Overwrite the mobile css via a plugin! Check this modification thread: http://www.vbulletin.org/forum/showthread.php?p=2171633 Download and install - now instead of editing the mobile css file you simply edit your CSS Templates, scroll down and find mobilestyle.css and double-click to edit, make changes to that css as it's called last and after the file is called! This template should not overwrite with an upgrade either so no worries there. Optional: Your calling a css template... let's not make it overwrite the file being called instead let's remove it properly. Open template headinclude Find: Code:
<link rel="stylesheet" href="clientscript/jquery/jquery.mobile-1.0a2.min.css?v={vb:raw vboptions.simpleversion}" /> Code:
<vb:comment><link rel="stylesheet" href="clientscript/jquery/jquery.mobile-1.0a2.min.css?v={vb:raw vboptions.simpleversion}" /></vb:comment> Customize your heart out and enjoy! Preferred CSS Layout ? Personally, I hate it when CSS is typed out as it is in the file, it's all crammed together and hard to read and edit imo! So I've taken the liberty and cleaned it up quite a bit, check it out below and remember it's an exact copy only in a more traditional style. Example: Code:
.ui-bar-a { border:1px solid #2A2A2A; background:#111; color:#fff; font-weight:bold; text-shadow:0 -1px 1px #000; background-image:-moz-linear-gradient(top,#3c3c3c,#111); background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3c3c3c),color-stop(1,#111)); -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#3c3c3c',EndColorStr='#111111')"; } **I also added in a outline near the end so the logo would not do the dotted border when clicked upon etc. *** Uploaded as attachment due to code being too long to post, rename and remove .php leaving only .css to view . &stc=1&d=1299713796 |