CSS Mobile Site Code iPhones Showing Mobile Websites

CSS Mobile Site Code Snippet

Mobile rules the web these days, and if your website is not mobile, your missing out on a large slice of web traffic. Converting a website to mobile requires an addition to the CSS or Cascading Style Sheets (code that tells the website how to look), that distinguishes between screen sizes and makes the appropriate adjustments to the website. To learn all about CSS, check out the amazing resource site CSS Tricks.

Assembled below is mobile site code that can be altered and used to make your website phone friendly. The correlating class and id names will have to be adjusted or created for your particular website, and this will usually require someone savvy to CSS.

CSS Mobile Site Code

/* -==========================- MOBILE -==========================- */
@media only screen and (min-width:240px) and (max-width:639px) {
.menusearch {padding:13px 0;margin-top:28px;}
#header {

#logo {
.searchbtn {
width:33px !important;
#secondarymenu-container {
#secondarymenu, #mainmenu {
padding:0 2%;
#secondarymenu li, #mainmenu li {
border-top:1px solid #d7d7d7;
#secondarymenu li a, #mainmenu li a{
.fp-next, .fp-prev {
margin:0 -5px;
.footer-widgets .widgetf:first-child {

#footer {
.widgetf {
border-top:1px solid #d3d3d3;
.articles .post-date {
.articles dt p img {
.fp-nav {
.slider-container {
#s {

Notice how the main focus on making sure the navigation menu is a different experience as well as the logo and footer aligned and adjusted to fit the mobile screen? Without these adjustments the site will be very difficult to navigate. Search and sliders and something your site may have, or may not, feel free to chop out the pieces you need and make the appropriate changes to the class names.

Need help adding this snippet to your website? Call 406-208-8733 or click here to fill out a contact form.

100th Blog Post Logo

Jophiel Silvestrone

Written by: Jophiel Silvestrone

Jophiel Silvestrone has written 210 posts in the Tech Blog.

Jophiel grew up on a ranch in Paradise Valley, Montana near Chico Hot Springs. Working on the ranch instilled work ethic and self motivation. Filled with this drive, Jophiel started mowing the local school's yards twice a month throughout the summers, at the age of 12. He moved to Billings in 2004, where he has been deeply involved in the local business community ever since. A serial entrepreneur, Jophiel has ran multiple businesses in our local community. The first business, a janitorial and carpet cleaning company, founded in 2005, has employed over 50 locals. Moving on to the media industry, Jophiel and several partners founded Green Directory Montana in the spring of 2007. Green Directory's sustainability ranking software awarded points based on sustainable or "green" actions. These points counted towards a business's total "Green Score," which in turn ranked them against other businesses in their category and throughout the entire site. It also featured a limited edition print version distributed annually. A business acquisition allowed Jophiel to focus on new projects, and a few close business colleagues and Jophiel started Rocky Mountain Mr. & Ms. Magazine, a lifestyle publication for men and women in the Magic City. After a year and a half at the helm of RM3 Magazine, the business was purchased. He now runs a web development company SkyPoint Studios and fathers his son Jaoquin, who plays football, basketball, soccer, and is learning snowboarding from his dad. Recently, has expanded to locations in Havasu, Arizona & Vegas. SkyPoint Studios is a market leader in both Billings & Havasu and Jophiel is working on building that same level of market dominance in Vegas. Specialties: Extensive experience in online and offline business. Especially savvy at WordPress, and operate several sites, one example is the blog: skypointwebdesignbillingsmontana.com/tech-blog. Check out skypointwebdesignbillingsmontana.com for the latest projects from SkyPoint Studios.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.