CSS Gradient Background

March 31st, 2011 § 0

This works in:

* Firefox >=3.6
* MSIE >=5.5 (!)
* Safari >=4
* Chrome

And it degrades gracefully in older browsers and Opera.

Vertical Gradient CSS:

.gradientV{
/* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */
/* and http://www.puremango.co.uk/2010/04/css-gradient/ */
/* fallback (Opera) */
background: #008800;
/* Mozilla: */
background: -moz-linear-gradient(top, #00FF00, #000000);
/* Chrome, Safari:*/
background: -webkit-gradient(linear,
left top, left bottom, from(#00FF00), to(#000000));
/* MSIE */
filter: progid:DXImageTransform.Microsoft.Gradient(
StartColorStr=’#00FF00′, EndColorStr=’#000000′, GradientType=0);
}

Horizontal Gradient CSS:
.gradientH{
/* thanks to http://blog.fakedarren.com/2010/01/cross-browser-css-gradients/ */

/* fallback (Opera) */
background: #008800;
/* Mozilla: */
background: -moz-linear-gradient(left, #00FF00, #000000);
/* Chrome, Safari:*/
background: -webkit-gradient(linear,
left top, right top, from(#00FF00), to(#000000));
/* MSIE */
filter: progid:DXImageTransform.Microsoft.Gradient(
StartColorStr=’#00FF00′, EndColorStr=’#000000′, GradientType=1);
}

JQuery and css tabs

October 4th, 2010 § 0

HTML

<ul>
    <li><a href="#tab1">Gallery</a></li>
    <li><a href="#tab2">Submit</a></li>
</ul>

<div>
    <div id="tab1">
        <!--Content-->
    </div>
    <div id="tab2">
       <!--Content-->
    </div>
</div>

Tabs CSS

ul.tabs {
	margin: 0;
	padding: 0;
	float: left;
	list-style: none;
	height: 32px; /*--Set height of tabs--*/
	border-bottom: 1px solid #999;
	border-left: 1px solid #999;
	width: 100%;
}
ul.tabs li {
	float: left;
	margin: 0;
	padding: 0;
	height: 31px; /*--Subtract 1px from the height of the unordered list--*/
	line-height: 31px; /*--Vertically aligns the text within the tab--*/
	border: 1px solid #999;
	border-left: none;
	margin-bottom: -1px; /*--Pull the list item down 1px--*/
	overflow: hidden;
	position: relative;
	background: #e0e0e0;
}
ul.tabs li a {
	text-decoration: none;
	color: #000;
	display: block;
	font-size: 1.2em;
	padding: 0 20px;
	border: 1px solid #fff; /*--Gives the bevel look with a 1px white border inside the list item--*/
	outline: none;
}
ul.tabs li a:hover {
	background: #ccc;
}
html ul.tabs li.active, html ul.tabs li.active a:hover  { /*--Makes sure that the active tab does not listen to the hover properties--*/
	background: #fff;
	border-bottom: 1px solid #fff; /*--Makes the active tab look like it's connected with its content--*/
}

Tab Content CSS

.tab_container {border: 1px solid #999;border-top: none;overflow: hidden;clear: both;float: left; width: 100%; 	background: #fff; }
.tab_content { 	padding: 20px; 	font-size: 1.2em; }

JQuery before </HEAD>

<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});
</script>

DISABLE phone number detection by Skype browser addon

September 13th, 2010 § 0

CSS trick for Web Developers to DISABLE phone number detection by Skype browser addon (e.g. AVOID “Skype Call” buttons):

Just insert invisible <span> with “_” inside phone number:

+123 456 <span style=”display:none;”>_</span> 789

Widgetized Footer to WordPress Theme

August 6th, 2010 § 0

The first step is to register the “sidebars.” To do this, simply replace the current contents of the functions.php file with the following:

<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Footer',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
?>

Now we’ll go into sidebar.php and replace the current dynamic sidebar conditional tag with this:

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>

With this:

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Sidebar") ) : ?>

Now we’ll go into our footer.php file and wrap the footer items in it’s own respective sidebar conditional tag. Right before the first “sidebar-item” div, add the following.

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer") ) : ?>

Right after the final closing “footer-item” div (and above the “clear” div which we added earlier) we’ll add the following:

<?php endif; ?>

Okay, now our sidebar and footer should be widgetized. Let’s test it out by adding a few widgets in the footer. I’ll add a Blogroll widget, Recent Comments widget, and a text widget. Here’s what it should look like:

Green Rays Footer 3



Flash in wordpress header

August 5th, 2010 § 0

http://forum.bytesforall.com/showthread.php?t=5953

HTML Code:

<div id="header-container">
<object width="550" height="101">
<param name="movie" value="http://www.daisytwist.com/wp-content/themes/atahualpa/images/header.swf">
<param name="wmode" value="transparent">
<embed src="http://www.daisytwist.com/wp-content/themes/atahualpa/images/header.swf" width="550" height="101" wmode="transparent">
</embed>
</object></div>

Then you add this CSS

#header-container {position: relative; z-index: 0;}

Best JS, Flash Ajax Galleries

August 5th, 2010 § 0

http://visionwidget.com/inspiration/web/453-javascript-flash-photo-gallery.html

http://valums.com/javascript-image-galleries/

Joomla contact form

August 5th, 2010 § 0

http://jforms.mosmar.com/

# ingle screen form creation using Easy WYSIWYG Form editor.
# A variaty of form elements:
# HTML elements that allows the user to have HTML within the form.
# Joomla! User Info Element that collects data about the user from Joomla! Database.
# Ability to define validation rules for different form elements.
# Ability to define who has the permission to fill any given form.
# Ability to define default (Pre-selected) value for most of form elements.
# IP Tracking.
# AJAX based Records manager featuring control over what fields to display and a simple keyword search.
# Generated forms are accessible and compliant with xHTML standards.
# Everything is validated on the both client-side and server-side.
# Ability to send submissions to any number of E-mails.
# Ability to send users confirmatory messages.
# Customizable E-mail messages.

Blinking text in IE

August 5th, 2010 § 0

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.::.</title>
<script type="text/javascript">
var docid = null;
var interval = 1000;
function blink()
{
var el = document.getElementById(docid);
if (typeof el != 'undefined' && el)
{
vis = (el.style.visibility == 'visible') ? 'hidden' : 'visible';
el.style.visibility = vis;
setTimeout("blink()", interval);
}
}
window.onload = function()
{
docid = 'sblink';
interval = 500;
setTimeout("blink()", interval);
}
</script>
<style type="text/css">
#sblink {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #FF0000;
}
</style>
</head>

<body>
<span id="sblink">BLINK TEXT</span>
</body>

</html>

Source: http://www.ivanov.nu/blog/viewpost.php?p=8

Copyright

August 5th, 2010 § 0

http://www.tynt.com/

Source: http://ivosiliev.com/seo/date:2009-10-02/zashtita-sadarjanieto-na-saita_197.html

Medicine for your IE6/PNG headache!

August 5th, 2010 § 0

http://www.dillerdesign.com/experiment/DD_belatedPNG/ – Official link

Download js file

<!--[if IE 6]>
<script src="DD_belatedPNG.js"></script>
<script>
/* EXAMPLE */
DD_belatedPNG.fix('.png_bg');

/* string argument can be any CSS selector */
/* .png_bg example is unnecessary */
/* change it to what suits you! */
</script>
<![endif]–>