Old 07-04-2018, 02:34 PM #1
Damas
Guest
 
Posts: n/a
Damas
Guest
 
Posts: n/a
Default How to show code/img to mobile only ?

Hello,

I am looking for code or class to put some content like text/imge to show only for mobile users and responsive ?

Reverse of this one
class="hideonmobile"

to be something like this
class="showonmobile"

Thank you
  Reply With QuoteReply With Quote
Old 07-10-2018, 09:45 AM #2
napy8gen's Avatar
napy8gen napy8gen is offline
Administrator
 
Join Date: Dec 2015
Posts: 105
napy8gen napy8gen is offline
Administrator
napy8gen's Avatar
 
Join Date: Dec 2015
Posts: 105
Default

Hi Brother,

I think a better way to do this if meant to used in the postbit is to use custom BBCODE.
First we need to define the custom bbcode.
Step 1:
Go to--->ACP--->Custom BB Codes--->Add new BBcode.
Title: BBcode Image display in mobile only
BB Code Tag Name: IMGmobile
Replacement:
Code:
<img class="imgshowonmobile" src="{param}" border="0" />
Example: [IMGmobile]You Image link[/IMGmobile]
Description: Image display on mobile only.
Use {option}: No

Click SAVE BBcode.

Step 2:
Go to--->ACP--->Styles & Templates--->Style Manager--->You Styles--->Main CSS--->Additional CSS Definitions
add this Code on the bottom of the window last
HTML Code:
html.range_0 .imgshowonmobile,
html.range_1 .imgshowonmobile,
html.range_2 .imgshowonmobile,
html.range_3 .imgshowonmobile{display:block}
html.range_4 .imgshowonmobile,
html.range_5 .imgshowonmobile{display:none}
napy8gen is offline   Reply With QuoteReply With Quote
Old 07-11-2018, 12:51 PM #3
Damas
Guest
 
Posts: n/a
Damas
Guest
 
Posts: n/a
Default

Thank you pro but I need to use it for banners on every page not only postbit

I will keep the tag code for future use thank you
  Reply With QuoteReply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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. The time now is 10:49 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
 

About Us SultanTheme.com

"Nam ad partem tibique suscipit, ut duis etiam integre usu. Nobis bonorum patrioque ea qui, eu paulo mediocritatem qui. Populo evertitur ut his, summo errem postea te his."

 

ST's vBulletin 3 Responsive Styles

Our newly refreshed styles in 2017, brings the old vb3 to the new level, responsive and modern feel. It comes with 3 colors with or without sidebar, fixed sized or fluid. Default vbulletin 3 style made responsive also available in the pack.

Copyright © 2017