0

Does anyone know if there is a conditional statement to use an alternative bit of code for mobile phones similar to the below?

<!--[if #)]>
<table width="600" align="center">
<![endif]-->

The "<table width="600" align="centre">" is simply filler code to show what I mean. The # is where the statement need to go. So for example...

Mobile version:

<!--[if #]>
<table width="300" align="left">
<![endif]-->

All other devices version:

<!--[if #]>
<table width="600" align="right">
<![endif]-->

I hope someone can help me. I'm struggling finding any reference online, maybe I'm using the wrong search terms?

I'm coding an email from scratch and would like to avoid media queries and scripts and keep the code as clean as possible.

Thanks guys! :)

Sarah
  • 23
  • 1
  • 3
  • 1
    the conditionals are IE-only anyways. given that Windows/IE on mobile has essentially 0% market share, you're barking up a non-existent tree. – Marc B May 31 '16 at 15:48
  • Hah thanks, I'm still a fledging :( – Sarah May 31 '16 at 15:49
  • You can know that with css. [See this question](http://stackoverflow.com/questions/14942081/detect-if-a-browser-in-a-mobile-device-ios-android-phone-tablet-is-used) – Ted May 31 '16 at 15:53

0 Answers0