Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 07-28-2011, 11:24 AM Quick Notes
Physicsguy's Avatar
404 - Title not found

Posts: 919
Name: Scott Kaye
Location: Ontario
Trades: 0
Below are some quick 'tips' I'll write about (and others can post below) for some little tricks I have found out with CSS.

Opacity issues:
- If you're trying to set a half-opaque, black border (like Facebook), try this:
HTML Code:
<div style="border:10px solid rgba(0,0,0,0.5);border-radius:10px;  padding:20px;width:400px;font-family:Arial;background:#fff;">Test div</div>
<!--Creates a Facebook popup-like div-->
*Note: The border-radius MUST be the same as the border-width (the first '10px', otherwise you'll get weird overlap issues.

- If you are trying to make a div half-opaque using opacity:0.5;, you'll find that the text inside it also changes it's opacity. How do we stop that?
HTML Code:
<div style="background:rgba(0,0,0,0.5);color:#fff;">Fully opaque text!</div>
As you can see, rgba is very useful in these situations. Check out this page for a chart showing compatibility.



This is a new thread, so please add some more things you have learned below!
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-29-2011, 03:47 AM Re: Quick Notes
Average Talker

Posts: 17
Trades: 0
Nice of you to post such messages.

However, the first code doesn't work, neither in IE9 nor FF4. The second one does, in FF4, but the first only produces shades of gray, not opacity. Just paste both codes into one file, give the body a yellow background, and see the difference.
FrankknarF is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Quick Notes
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.88826 seconds with 12 queries