Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 22nd Jan 2012, 06:34 AM   #1
Digital Marketer
War Room Member
 
WillR's Avatar
 
Join Date: 2010
Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
Default
Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

I have had a number of people ask me how to add transparency to certain parts of their mobile website so that the background of the page can be seen through certain sections such as your homepage menu.

Here is a simple example of how to add transparency to your mobile website.

Let's say you had a section of your mobile website (such as your homepage main menu) that was in front of the background of the page and so you wanted to add some transparency so you could see a little of the background color through that menu.

The css code controlling the color of that menu background might look something like this:

#content { background:#EEEDED}

If we wanted to add transparency to that menu the code would now look something like this (the only code that has been added is in bold):

#content { background:#EEEDED; opacity:.35; filter:alpha(opacity=35);}

Make sure you change the 35 values to anything between 0 and 100 and that both of those values are always the same. The lower the values the more transparent the background will be. In the example below I used a transparency of 35% but it was only to show you how it works. Usually a value of around 60-75% will give best results but feel free to experiment yourself.



For more information visit:
CSS Image Opacity / Transparency

WillR is offline  
Unread 22nd Jan 2012, 08:56 AM   #2
HyperActive Warrior
War Room Member
 
Pierre!'s Avatar
 
Join Date: 2009
Location: Tucson, Arizona
Posts: 215
Thanks: 166
Thanked 69 Times in 44 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

*NICE* tip WillR!

Thank You for that.
Patrick

Internet Safety Tips - The Essentials
Internet Safety Tips – “The Essentials” – Examples Of Attacks
Check out this chapter, then sign up to download YOUR copy!
Pierre! is offline  
Unread 22nd Jan 2012, 09:36 AM   #3
Advanced Warrior
War Room Member
 
bloggerd's Avatar
 
Join Date: 2011
Location: United Kingdom
Posts: 678
Thanks: 96
Thanked 171 Times in 141 Posts
Blog Entries: 14
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Thankyou WillR for this tutorial.

Cheers
Ian

bloggerd is offline  
Unread 28th Jan 2012, 05:45 PM   #4
Active Warrior
War Room Member
 
Join Date: 2011
Location: Where Warriors Roam
Posts: 93
Thanks: 82
Thanked 13 Times in 13 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Great tutorial Will
How do you inser an image in the backround so we could see the image throuh the menu?

Our Actions Proves What We Really Belive In
LiorN is offline  
Unread 29th Jan 2012, 06:59 PM   #5
HyperActive Warrior
War Room Member
 
T2007's Avatar
 
Join Date: 2007
Location: CA, USA
Posts: 295
Thanks: 258
Thanked 55 Times in 29 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Thanks, Will, for this tip.
As usual, you are on top of things
T2007 is offline  
Unread 1st Feb 2012, 04:46 AM   #6
In search of knowledge
 
Young Samurai's Avatar
 
Join Date: 2010
Location: N. Ireland, the Golfing capital of the world
Posts: 473
Thanks: 68
Thanked 56 Times in 48 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Lior,

Just pm'ed you. Let me know how you get on.

Regards,

Originally Posted by LiorN View Post

Great tutorial Will
How do you inser an image in the backround so we could see the image throuh the menu?

Kyle
Young Samurai is offline  
The Following User Says Thank You to Young Samurai For This Useful Post:
Unread 1st Feb 2012, 06:48 AM   #7
HyperActive Warrior
 
JToneyUK's Avatar
 
Join Date: 2011
Location: North West, England
Posts: 267
Thanks: 97
Thanked 41 Times in 34 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Others might have this question so I will answer it publically.

Your "content" div should have a background image value instead of a background color as in wills example.


#content { background-image:url('background.png')}


Then with your menu over the top of this, with transparency, you will see the image underneath.

Obviously you will need to ensure your image will fit nicely in that content div including allowances for stretching to the "landscape" view.

Originally Posted by LiorN View Post

Great tutorial Will
How do you inser an image in the backround so we could see the image throuh the menu?
JToneyUK is offline  
The Following 2 Users Say Thank You to JToneyUK For This Useful Post:
Unread 1st Feb 2012, 12:36 PM   #8
Warrior Member
 
Join Date: 2010
Posts: 26
Thanks: 11
Thanked 2 Times in 2 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Originally Posted by WillR View Post

I have had a number of people ask me how to add transparency to certain parts of their mobile website so that the background of the page can be seen through certain sections such as your homepage menu.

Here is a simple example of how to add transparency to your mobile website.

Let's say you had a section of your mobile website (such as your homepage main menu) that was in front of the background of the page and so you wanted to add some transparency so you could see a little of the background color through that menu.

The css code controlling the color of that menu background might look something like this:

#content { background:#EEEDED}

If we wanted to add transparency to that menu the code would now look something like this (the only code that has been added is in bold):

#content { background:#EEEDED; opacity:.35; filter:alpha(opacity=35);}

Make sure you change the 35 values to anything between 0 and 100 and that both of those values are always the same. The lower the values the more transparent the background will be. In the example below I used a transparency of 35% but it was only to show you how it works. Usually a value of around 60-75% will give best results but feel free to experiment yourself.



For more information visit:
CSS Image Opacity / Transparency

Thank you Will for the tip. Bought your WSO "My mobile business" and I still owe you a review. Reason being late?!? I am trying to figure out how to add an image in the background. I don't want just a "boring" simple version, because this one is ready yet. Want more WOW...How can I do that? Your advice will be very much appreciated

Thank you
Daniela
DanielaG is offline  
Unread 1st Feb 2012, 01:17 PM   #9
Active Warrior
War Room Member
 
Join Date: 2011
Location: Where Warriors Roam
Posts: 93
Thanks: 82
Thanked 13 Times in 13 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Originally Posted by Young Samurai View Post

Lior,

Just pm'ed you. Let me know how you get on.

Regards,
Got it, Thanks Kyle

Our Actions Proves What We Really Belive In
LiorN is offline  
Unread 1st Feb 2012, 03:42 PM   #10
Warrior Member
 
Join Date: 2010
Posts: 26
Thanks: 11
Thanked 2 Times in 2 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Hey Kyle

Have the same question as LiorN (How do you insert an image in the background so we could see the image through the menu?). Could you help me, please?

Daniela
DanielaG is offline  
Unread 1st Feb 2012, 04:40 PM   #11
In search of knowledge
 
Young Samurai's Avatar
 
Join Date: 2010
Location: N. Ireland, the Golfing capital of the world
Posts: 473
Thanks: 68
Thanked 56 Times in 48 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Daniela,

If you want an image background to the menu alone go with JToneyUK's suggestion above.

If you want an image background to the menu and click to call button then you place the image in a different location.

Assuming you're using one of Will's templates -

Down about line 84/85 in the style.css is the style for #wrapper

The wrapper is an identifier for a div which includes the click to call button and the menu.

Let's say you want to display the picture my_pic.jpg behind the menu, change the #wrapper to

#wrapper { background:url(../images/my_pic.jpg) top center repeat; width:92%; float:left; padding:0px 4% 20px 4%}

That should do it.

I'm not totally certain about the best dimensions for the picture. It's height will depend on the size of your menu. The repeat means it will fill the whole space in anycase it's just sometimes a repeating image looks strange.

The image can be .jpg .png or .gif The size in kb is the biggest issue. Try to keep it as small as possible.

Kyle
Young Samurai is offline  
The Following 2 Users Say Thank You to Young Samurai For This Useful Post:
Unread 1st Feb 2012, 04:45 PM   #12
Warrior Member
 
Join Date: 2010
Posts: 26
Thanks: 11
Thanked 2 Times in 2 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Thank you Kyle...will try it. And yes, I am using Will's templates...
DanielaG is offline  
Unread 3rd Feb 2012, 08:11 PM   #13
In search of knowledge
 
Young Samurai's Avatar
 
Join Date: 2010
Location: N. Ireland, the Golfing capital of the world
Posts: 473
Thanks: 68
Thanked 56 Times in 48 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Is there an optimum width for a background image?

Kyle
Young Samurai is offline  
Unread 3rd Feb 2012, 08:14 PM   #14
Active Warrior
War Room Member
 
Join Date: 2011
Location: Where Warriors Roam
Posts: 93
Thanks: 82
Thanked 13 Times in 13 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Originally Posted by Young Samurai View Post

Is there an optimum width for a background image?
well, the page itself is set for 320*600 (or 640)
but you have to playusing gifbot to see what's working for you

Our Actions Proves What We Really Belive In
LiorN is offline  
Unread 21st Feb 2012, 01:01 PM   #15
HyperActive Warrior
 
Join Date: 2009
Posts: 168
Thanks: 33
Thanked 21 Times in 20 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

#content and #wrapper does not apply to all mobile themes (like Quentin's - but I'm sure he is trying to figure this out too).

My eyes are peeled for a solution.

It's a really cool feature to have transparency and think it will make for more sales down the road cause it looks so elegant for a visitor.

WillR, have you tried adding a background image with transparency to one of your sites? If so, may we see how it turned out?


KingMedia is offline  
Unread 21st Feb 2012, 10:17 PM   #16
VIP Warrior
War Room Member
 
Daniel Evans's Avatar
 
Join Date: 2011
Location: United Kingdom
Posts: 3,590
Thanks: 3,078
Thanked 2,279 Times in 1,276 Posts
Blog Entries: 16
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Thanks Will

I'll be applying this to my sites!


Daniel
Daniel Evans is offline  
Unread 21st Feb 2012, 10:26 PM   #17
Warrior Member
War Room Member
 
Jodik's Avatar
 
Join Date: 2012
Location: Florida
Posts: 27
Thanks: 13
Thanked 1 Time in 1 Post
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Great tip Thanks
Jodik is offline  
Unread 21st Feb 2012, 11:44 PM   #18
Active Warrior
 
Join Date: 2011
Posts: 59
Thanks: 9
Thanked 46 Times in 33 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

This is a great tip! I think a lot of mobile site developers leave this out (along with background images) in preference for more speed but their is a balance that must be struck between performance and asthetics to improve the overall UX. As long as we use low res background images or repeating textures we should be able to satisfy all three goals.
Legacy3 is offline  
Unread 22nd Feb 2012, 07:18 PM   #19
Digital Marketer
War Room Member
 
WillR's Avatar
 
Join Date: 2010
Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Originally Posted by KingMedia View Post

#content and #wrapper does not apply to all mobile themes (like Quentin's - but I'm sure he is trying to figure this out too).
Yes, they are just what I have called those sections on my page but the same works on any other website. You just add the code to the section you are wanting to change.

WillR is offline  
Unread 16th Mar 2012, 05:34 AM   #20
Dave Zegers
War Room Member
 
Join Date: 2011
Location: The Hague
Posts: 559
Thanks: 229
Thanked 207 Times in 118 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Thanks for that great tip, i will try this out at once

YellowGreenMedia is offline  
Unread 17th Mar 2012, 11:24 AM   #21
HyperActive Warrior
War Room Member
 
1234nasir's Avatar
 
Join Date: 2010
Location: Warrior Forum
Posts: 258
Thanks: 4
Thanked 10 Times in 9 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Really true analysis. Thanks to thread opener too.



Originally Posted by Legacy3 View Post

This is a great tip! I think a lot of mobile site developers leave this out (along with background images) in preference for more speed but their is a balance that must be struck between performance and asthetics to improve the overall UX. As long as we use low res background images or repeating textures we should be able to satisfy all three goals.

1234nasir is offline  
Unread 17th Mar 2012, 01:33 PM   #22
HyperActive Warrior
 
design2convert's Avatar
 
Join Date: 2011
Posts: 249
Thanks: 27
Thanked 16 Times in 15 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Tips were really nice to enhance the quality of transparency of mobile site.

design2convert is offline  
Unread 17th Mar 2012, 11:57 PM   #23
Active Warrior
 
BizGrabbers's Avatar
 
Join Date: 2011
Location: Alabama, USA
Posts: 73
Thanks: 70
Thanked 36 Times in 31 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

You learn something new every day. Thanks Will for the tip.

As always, when Will speaks, I listen.

BizGrabbers is offline  
Unread 18th Mar 2012, 05:08 PM   #24
Active Warrior
 
Join Date: 2003
Location: Tulsa, Oklahoma
Posts: 50
Thanks: 14
Thanked 15 Times in 14 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Great info. Thanx Will.

Visit ... The Insider's Circle
34 Free Reports. Tons of Downloads.
how2no is offline  
Unread 5th Apr 2012, 10:04 PM   #25
HyperActive Warrior
War Room Member
 
T2007's Avatar
 
Join Date: 2007
Location: CA, USA
Posts: 295
Thanks: 258
Thanked 55 Times in 29 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

I saved this link some time ago and now that I want to use this tactic, I can't get it to work.
This is what I have in css:

#content { width:99.8%; float:left; position:relative}

not this #content { background:#EEEDED}

When I change it to:

#content { background:#EEEDED; opacity:.35; filter:alpha(opacity=35);}

the whole site displays funny.

Why is it that I don't see what Will states in my css? i.e.

#content { background:#EEEDED}

I'm thinking that I may be placing the code in the wrong place but can't seem to find another div for content, but the one that is under 03. wrapper and content.

Hope some of you who are more experienced can help me with this.
Thanks!
T2007 is offline  
Unread 8th Apr 2012, 12:34 AM   #26
Digital Marketer
War Room Member
 
WillR's Avatar
 
Join Date: 2010
Location: Australia
Posts: 12,475
Thanks: 1,984
Thanked 8,187 Times in 4,079 Posts
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

Tammy,

Contact me via email and I'll help you out.

WillR is offline  
The Following User Says Thank You to WillR For This Useful Post:
Unread 12th Apr 2012, 05:15 PM   #27
Warrior Member
 
Join Date: 2011
Posts: 25
Thanks: 1
Thanked 1 Time in 1 Post
Default
Re: Adding Transparency to Your Mobile Websites [Tutorial]
Share on: 
fb share twitter share gplus share more share

I am able to get the transparency, but that seems to have the effect of just choosing a lighter colour in the first place.

I was hoping it would be possible to have a background pic such that if you navigate away, it would still be in the background.

I tried JToney's suggestion, but I'm not sure if you're supposed to replace the #content { background:#EEEDED} with #content { background-image:url('background.png')}.
I tried that, and it just ignores the colour aspect and goes to default white (for the menu), without having a background pic.
More Ideas is offline  
Closed Thread


Bookmarks

Tags
adding, mobile, transparency, tutorial, websites


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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 08:04 PM.