Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 Tips and Tricks - HALL OF FAME
 Responsive Design Useful Links and Tips
Author « Topic »  

Marshall
Ecommerce Template Guru

USA
1874 Posts

Posted - 03/04/2013 :  11:20:03  
While I am not a big advocate of Responsive Designs, and by no means an expert, I thought I would share some useful links and tips I learned while converting my one site.

Responsive Designs do not require multiple style sheets. Using the @media rule, you can keep your site to one style sheet. However, the @media (and @import) rule does not work on IE8 or earlier, so you may have to make a separate style sheet specific to IE8 and earlier, but more on that later.

Using @media, a mere three lines of CSS can adjust your site to a mobile device. For example, for my one site From Our Heart, I have the width of the page wet using an outer wrapper, 1010 pixels. Everything within the wrapper is set to percentages. While a site set to 100% width will reduce to accommodate smaller devices, there are some devices with wide screens such as the Samsung Galaxy tablet with is 1280 pixels wide and no matter if your site is a specific width or 100%, the Galaxy Tablet does create issues. Your site will render in its entirety, but will be very small. However, on a Kindle Fire, it will look okay. This is just one of the issues confronting a Responsive Design. To accommodate the Samsung Galaxy tablet, I added a few lines to my CSS using @media:
@media screen and (min-device-width: 1081px) and (max-device-width: 1280px) and (orientation: landscape) {
body {
font-size: 1.25em;
}
#wrapper {
max-width: 100%;
margin: 0 70px 0 10px;
}
#center {
max-width: 950px;
}
#contentCenter p {
line-height: 2em;
}
#contentCenter a, #contentCenter a:active, #contentCenter a:hover, #contentCenter a:visited {
text-decoration: underline
}
}

With this code added to my CSS, I was able to adjust for the Samsung Galaxy very easily. Since PC’s/Laptops do not recognize the (orientation: landscape), this code will not affect the CSS. Same holds true for (orientation: portrait) Granted, there were other tweaks I had to made, but I did all my device specific CSS adding no more than 10 lines of CSS to my existing CSS file using the @media rules. I also increased the font size for the Samsung Galaxy as it appeared very small.

Also using @media, you can easily make you site look good and function down to a screen as small as 200 pixels. Some additional tweaks you might have to make is the height of the products <div> as they will get taller as you go from 3 columns to 2 to one. You may also want to underline you hyperlinks for small screens and increase the line height to make it easier to use your thumb. These are just a few things to consider.

You can also use @media only print { } to easily make a printer friendly version.

IMPORTANT When using @media, your styles are contained within the curly brackets { } of the @media.
@media { /*beginning @media curly bracket*/
body { margin: 0}
/*more styles */
}/*end @media curly bracket*/

A few non-PC/Laptop specific <head> tags you may want to consider are the following:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes" />
This code allows or denies rescaling (zooming) of your site.
<meta name="format-detection" content="telephone=yes" />
This code makes your phone number a hyperlink so all your visitors have to do is tap it to call you. A thoughtful convenience.
<meta name="format-detection" content="address=no" />
This code links you address to the phone’s map app. Again, convenient if you have a brick and mortar store.

And, of courses, there is Internet Explorer, the not always compliant browser. For anyone using IE9+, there should be no issues. However, IE8 and earlier can cause you problems. Aside from not recognizing @media or @import, IE8 and earlier does not recognize border-radius. IE7 and earlier does not recognize position: fixed, Max-width/height, min-width/height and so on. These are just a few issues. That being said, you may want to make an IE specific style sheet and take advantage of Internet Explorer’s Conditional Comment tag.

If you are not familiar with it, it is simply the following: <!--[if lte IE 8]>Your Style Here or Link To A Style Sheet<![endif]--> In this example, it is for Less Than Or Equal To Internet Explorer 8 (lte) Your other options are (lt) and simply <!--[if IE 8]> <![endif]-->.

Before you go crazy over all of this, you will not accommodate every device perfectly. You can, however, make your site functional and look good with as little coding as possible, and less than you may have thought. Remember, some people pay for bandwidth so the less code the better.

REFERENCES
For a fairly comprehensive list of screen resolutions, visit Responsive design device resolution reference
For using @media and @import, the following sites are helpful:

Introduction to CSS Media Queries

Detecting device size & orientation in CSS


7 Media types

Responsive Design Testing This site will let you view yours on multiple screen widths, however, it will not adjust the font to a specific device.

As I said in the beginning, I am no expert on the subject, but I thought I would share the results of my research. If you have any specific questions, feel free to contact me.

Marshall

From Our Heart
FromOurHeart.com
Gifts, Plush Stuffed Animals, Toy, Games, Puzzles, 3D Gift Cards, Nostalgic Signs, and Collectibles

Marshall
Ecommerce Template Guru

USA
1874 Posts

Posted - 03/04/2013 :  16:01:55  
I made this its own thread, but should have placed it here. Sorry for the duplication.

Anyway, I created this scale to help determine the width/resolution of devices.


If you use this, I suggest the following code in your <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="robots" description="noindex,nofollow,noarchive,nosnippet,noodp" />
<style type="text/css">
body {
margin: 0;
padding: 0;
}
</style>

Or you are welcome to use the one on my page which also includes a fixed width <div> for additional reference. - http://www.fromourheart.com/screen_resolution_scale.htm

Marshall

Edit - changed user-scalable=yes to user-scalable= no. For testing, this is the better setting.

From Our Heart
FromOurHeart.com
Gifts, Plush Stuffed Animals, Toy, Games, Puzzles, 3D Gift Cards, Nostalgic Signs, and Collectibles

Edited by - Marshall on 03/04/2013 23:13:31

Mikelli
Ecommerce Template Guru

USA
1613 Posts

Pre-sales questions only
(More Details...)

Posted - 03/04/2013 :  20:38:15  
Marshall, I am so glad you are in the forum and willing to take the time to teach, tip and advise!!

It's this kind of thing that makes this the best shopping cart out there. It is also why I bought ECT in the first place and why I post like I do trying to help others if I possibly can. Just trying to give back in appreciation to those that gave to me early on and help the new ones like I was a few years ago come aboard.

Now after all that, I guess I better get back to work on redesigning my own sites. Thanks for sharing!!

Michael

Marshall
Ecommerce Template Guru

USA
1874 Posts

Posted - 03/04/2013 :  21:21:51  
Michael,

Thanks

One thing I left out - MOBILE ICONS.

You are use to using a favicon (image.ico) for your website, well mobile has different requirements.

For mobile devices, favicons should be png images, not ico. There are typically three sizes:
<link rel="apple-touch-icon" media="screen and (resolution: 163dpi)" href="/mobile/images/icon57x57.png" />
<!-- 114 x 114 iPhone 4 icon -->
<link rel="apple-touch-icon" media="screen and (resolution: 326dpi)" href="/mobile/images/icon57.png" />
<!-- 57 x 57 Nokia icon -->
<link rel="shortcut icon" href="/mobile/images/icon57x57.png" />

You can also create a shortcut icon. This should be 158px square png image. The link code is

<link rel="mobile-icon" href="/_src/mobile_icon.png" />

You can read more about mobile icons here - http://mobilewebrockstar.com/blog/mobile-icon/

Marshall

From Our Heart
FromOurHeart.com
Gifts, Plush Stuffed Animals, Toy, Games, Puzzles, 3D Gift Cards, Nostalgic Signs, and Collectibles

Edited by - Marshall on 03/04/2013 21:51:55

Andy
ECT Moderator

95440 Posts

Posted - 04/05/2013 :  13:18:11  
Here's a decent collection of resources that may be of interest http://mashable.com/2013/03/18/web-design-tools/

Andy

Please review our software and services

ECT newsletter
ECT hosting suggestions

Follow us on Twitter, Facebook, Google + and YouTube



Andy
ECT Moderator

95440 Posts

Posted - 05/17/2013 :  03:25:52  
...and some more css tips here http://www.gonzoblog.nl/2013/01/16/11-useful-css-code-snippets-for-responsive-web-design/

Andy

Please review our software and services

ECT newsletter
ECT hosting suggestions

Follow us on Twitter, Facebook, Google + and YouTube



Mikelli
Ecommerce Template Guru

USA
1613 Posts

Pre-sales questions only
(More Details...)

Posted - 08/25/2013 :  00:58:26  
We have a been spending a lot of time of late adding content to our sites. Getting our sites updated to Responsive Design standards is getting closer. In researching it, I ran across the following that might help others
http://flauntresponsive.com/blog/16-favorite-tools-for-responsive-websites/

Michael

Andy
ECT Moderator

95440 Posts

Posted - 11/27/2014 :  12:11:20  
Phil and Paul have kindly linked to some responsive menus they have used with success

http://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=99898

Mega menu - http://codecanyon.net/item/responsive-mega-menu-complete-set/152825 ($6.00)

Responsive drop downs - http://www.smartmenus.org/ (Free)

Andy

Please feel free to review / rate our software

Andy
ECT Moderator

95440 Posts

Posted - 02/13/2015 :  05:42:44  
I just had a YouTube video break the design I was working on.

There's a good and simple fix here via the css file

http://avexdesigns.com/responsive-youtube-embed/

Andy

Please feel free to review / rate our software

ITZAP
Ecommerce Template Guru

Australia
1009 Posts

Posted - 02/13/2015 :  19:19:17  
Good tip Andy.

That responsive YouTube video CSS is exactly the same as ZURB Foundation 5 use.
http://foundation.zurb.com/docs/components/flex_video.html

Use the very same CSS class to make a Google Map responsive.

Gary

Phil
ECT Moderator

United Kingdom
7617 Posts

Posted - 03/19/2015 :  06:54:29  
Here's another responsive menu that I've just added to my own site that seems to work very well -
Try it out on your mobile - http://www.bettapages.com

Here's the source - http://toddmotto.com/flaunt-js-for-stylish-responsive-navigations-with-nested-click-to-reveal/



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.05 seconds. Snitz Forums 2000