Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

transparent table background?

images php coding issues or problems here.

Moderators: macek, egami, gesf

transparent table background?

Postby ciokhan » Wed Jun 08, 2011 12:02 am

hello

i need one of 2 things. either to make a table which changes its background color to black when the mouse enters the table and when the mouse is out, the background color should be transparent again

OR

i want a table with permanent transparent color like this site

http://koivi.com/ie-png-transparency/

i need this because i have a table with a lot of text which is displayed over a background image and i want both the text and the background image to be visible in the same time. i modified the code behind the site above and it works but only if i use the images provided by the site. if i come with images of my own, it doesn't work anymore.. so i downloaded GIMP, i tried to add an alpha channel and save my image as PNG but no effect. i also tried to make a PNG image with only one selected color as transparent and yes the selected image color becomes transparent BUT it doesn't create the effect i need - when the table is over the image, the table is drawn as opaque instead of transparent.. i googled everywhere and i can't find a fix to this problem. can anybody help me please? also i'm quite noob so if you can give detailed explanations i'd appreciate
ciokhan
New php-forum User
New php-forum User
 
Posts: 3
Joined: Tue Jun 07, 2011 11:58 pm

Re: transparent table background?

Postby msmohan » Wed Jun 08, 2011 1:38 am

hi,

i am answering for

i want a table with permanent transparent color like this site


please use the following.

Code: Select all
style="opacity:0.9;filter:alpha(opacity=90);"


----------------------------------------

working in http://www.websteed.com a web design and development company in salem.
msmohan
New php-forum User
New php-forum User
 
Posts: 36
Joined: Sun Jun 05, 2011 9:03 pm

Re: transparent table background?

Postby ciokhan » Wed Jun 08, 2011 7:08 am

alright it's good but the text in the table becomes transparent as well. so how do i make the text opaque now?
ciokhan
New php-forum User
New php-forum User
 
Posts: 3
Joined: Tue Jun 07, 2011 11:58 pm

Re: transparent table background?

Postby gandahar » Thu Jun 09, 2011 5:42 am

you can put a div in your table :

Code: Select all
<table style="background: transparent;">
  <tr>
    <td>
       <div style="color: black; background: none;">you text</div>
    </td>
  </tr>
</table>



so you'll have a body background image, a transparent background table (or opacity) and a div with no opacity on text
User avatar
gandahar
New php-forum User
New php-forum User
 
Posts: 112
Joined: Tue Mar 15, 2011 4:05 am

Re: transparent table background?

Postby webinfopedia » Fri Jun 10, 2011 1:53 am

Hi,
I will tell you the simple way..
create a small image and fill the required color. now make its opacity to 50%. save it as PNG or GIF with transference. I your website main div will have that background image. on content BG div put this image as a background image and repeat it. Hope you got it...if any doubt let me know...
Here is the demo with download.

http://www.webinfopedia.com/demo/Transparent-bg/

Thank You
http://www.webinfopedia.com
User avatar
webinfopedia
New php-forum User
New php-forum User
 
Posts: 84
Joined: Sat May 21, 2011 10:26 pm


Return to PHP coding => Images

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.