Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-17-2011, 11:58 PM   PM User | #1
bigmarkess
New to the CF scene

 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
bigmarkess is an unknown quantity at this point
Post 2 images in 1 div at DIFFERENT times

I'm working on a mobile version on a web site and while I know you can remove pictures according to views (Mobile, Tablet, Desktop) I want to use one div or two if that will work to display a different picture in the same area for mobile view.

So when you look at the site on the desktop it has a big picture (Img) and when you view it on a mobile screen it show a different picture. I do have 3 separate style sheets one for the each view.

Is it possible to tell the mobile css to turn off the tab/desktop div and display the mobile div img? or something like that.

I hope I've explained it well enough...

Thank you in advance,
BigMarkess
bigmarkess is offline   Reply With Quote
Old 11-18-2011, 02:57 PM   PM User | #2
alykins
Senior Coder

 
alykins's Avatar
 
Join Date: Apr 2011
Posts: 1,608
Thanks: 37
Thanked 183 Times in 182 Posts
alykins will become famous soon enough
put all three in the div and ID them...

Code:
<img id="PC" ... />
<img id="Tablet" ... />
<img id="Mobile" ... />
then in your CSS (since you said you handle the platforms- and I presume the calls to the CSS files pend the platform) target accordingly... so for example the "PC" one might have this chunk of code
Code:
#PC {style it}
#Tablet {display:none;}
#Mobile {display:none;}
I have not yet coded for mobile devices and tablets, but I thought you did a lot more in the handling of determining "what the device is" server side script- if so you could also handle this server side script as well I assume but again my XP mobile/tab dev is null
__________________

I code C hash-tag .Net
Reference: W3C W3CWiki .Net Lib
Validate: html CSS
Debug: Chrome FireFox IE
alykins is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:33 AM.


Advertisement
Log in to turn off these ads.