15000 tutorials per photoshop

Ottima raccolta di tutorials su good-tutorials.com divisi per categorie.
Sito web: http://www.good-tutorials.com/

Ottima raccolta di tutorials su good-tutorials.com divisi per categorie.
Sito web: http://www.good-tutorials.com/

Ottimo sito dove poter trovare interessanti tutorial avanazati su programmazione web.
Sito web: http://nettuts.com/
In questo articolo vedremo come modificare lo stile css di una pagina web con uno script javascript. Nella pagina html, avremo l'elenco degli stili:
...
<link rel="stylesheet" type="text/css" href="stile1.css" title="stile1" />
<link rel="alternate stylesheet" type="text/css" href="stile2.css" title="stile2" />
...
e oltre al resto della pagina, la chiamata al file javascript:
<script type="text/javascript" src="switcher.js"></script>
cosi impostato:
/* Style Switcher by Paul Sowden, see A List Apart: http://www.alistapart.com/articles/alternate/ */
function setActiveStyleSheet(title) {
var i, a, main;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title) a.disabled = false;
}
}
}
function getActiveStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
}
return null;
}
function getPreferredStyleSheet() {
var i, a;
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if(a.getAttribute("rel").indexOf("style") != -1
&& a.getAttribute("rel").indexOf("alt") == -1
&& a.getAttribute("title")
) return a.getAttribute("title");
}
return null;
}
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
window.onload = function(e) {
var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
}
window.onunload = function(e) {
var title = getActiveStyleSheet();
createCookie("style", title, 365);
}
var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);
document.writeln("<div id=\"textsize\">Passa a stile1: <a href=\"#\" onclick=\"setActiveStyleSheet('stile1'); return false;\" id=\"stile1\">Stile1</a><a href=\"#\" onclick=\"setActiveStyleSheet('stile2'); return false;\" id=\"stile2\">Passa a stile2</a></div>");
Ottima raccolta di link a tecniche ed esempi di cosa si puo fare con i css.
Sito web: http://www.alvit.de/web-dev/css-techniques-and-examples.html

Raccolta di siti web che offrono stili css per formattazione di tabelle.
Sito web: http://www.smashingmagazine.com/...bles-modern-solutions/

Ottima raccolta di menu css da smashingmagazine
Sito web: http://www.smashingmagazine.com/2008/02/26/navigation-menus-trends-and-examples/
<div id=”container”>
<b class=”rtop”>
<b class=”r1″></b> <b class=”r2″></b> <b class=”r3″></b> <b class=”r4″></b>
</b>
<!–content goes here –>
<b class=”rbottom”>
<b class=”r4″></b> <b class=”r3″></b> <b class=”r2″></b> <b class=”r1″></b>
</b>
</div>
.rtop, .rbottom{display:block}
.rtop *, .rbottom *{display: block; height: 1px; overflow: hidden}
.r1{margin: 0 5px}
.r2{margin: 0 3px}
.r3{margin: 0 2px}
.r4{margin: 0 1px; height: 2px}

<ol>
<li>
<p>This is line one</p>
</li>
<li>
<p>Here is line two</p>
</li>
<li>
<p>And last line</p>
</li>
</ol>
ol {
font: italic 1em Georgia, Times, serif;
color: #999999;
}
ol p {
font: normal .8em Arial, Helvetica, sans-serif;
color: #000000;
}

<form>
<label for=”name”>Name</label>
<input id=”name” name=”name”><br>
<label for=”address”>Address</label>
<input id=”address” name=”address”><br>
<label for=”city”>City</label>
<input id=”city” name=”city”><br>
</form>
label,input {
display: block;
width: 150px;
float: left;
margin-bottom: 10px;
}
label {
text-align: right;
width: 75px;
padding-right: 20px;
}
br {
clear: left;
}

blockquote:first-letter {
background: url(images/open-quote.gif) no-repeat left top;
padding-left: 18px;
font: italic 1.4em Georgia, “Times New Roman”, Times, serif;
}

<h1><span></span>CSS Gradient Text</h1>
h1 {
font: bold 330%/100% “Lucida Grande”;
position: relative;
color: #464646;
}
h1 span {
background: url(gradient.png) repeat-x;
position: absolute;
display: block;
width: 100%;
height: 31px;
}
<!–[if lt IE 7]>
<style>
h1 span {
background: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’gradient.png’, sizingMethod=’scale’);
}
</style>
<![endif]–>

div{
height:100px;
}
div *{
margin:0;
}
div p{
line-height:100px;
}
<p>Content here</p>

<div class=”roundcont”>
<div class=”roundtop”>
<img src=”tl.gif” alt=”"
width=”15″ height=”15″ class=”corner”
style=”display: none” />
</div>
CONTENT
<div class=”roundbottom”>
<img src=”bl.gif” alt=”"
width=”15″ height=”15″ class=”corner”
style=”display: none” />
</div>
</div>
.roundcont {
width: 250px;
background-color: #f90;
color: #fff;
}
.roundcont p {
margin: 0 10px;
}
.roundtop {
background: url(tr.gif) no-repeat top right;
}
.roundbottom {
background: url(br.gif) no-repeat top right;
}
img.corner {
width: 15px;
height: 15px;
border: none;
display: block !important;
}

<img src=”image.gif” class=”class1 class2″ alt=”" />
.class1 { border:2px solid #666; }
.class2 {
padding:2px;
background:#ff0;
}
<div id=”container”></div>
#container {
margin:0px auto;
}

<p class=”introduction”> This paragraph has the class “introduction”. If your browser supports the pseudo-class “first-letter”, the first letter will be a drop-cap. </p>
p.introduction:first-letter {
font-size : 300%;
font-weight : bold;
float : left;
width : 1em;
}

a{
white-space:nowrap;
}
#main{
overflow:hidden;
}
html{
overflow:-moz-scrollbars-vertical;
}
textarea{
overflow:auto;
}
Via: http://stylizedweb.com/2008/03/12/most-used-css-tricks/

Ottimo articolo bene commentato su: http://jeffhowden.com/code/css/forms/
oppure semplicemente:
<form>
<label for=”name”>Name</label>
<input id=”name” name=”name”><br>
<label for=”address”>Address</label>
<input id=”address” name=”address”><br>
<label for=”city”>City</label>
<input id=”city” name=”city”><br>
</form>
label,input {
display: block;
width: 150px;
float: left;
margin-bottom: 10px;
}
label {
text-align: right;
width: 75px;
padding-right: 20px;
}
br {
clear: left;
}

File css:
p.yellow::selection {
background: #fff2a8; /* Safari */
}
p.yellow::-moz-selection {
background: #fff2a8; /* Firefox */
}
Nel file html:
<p class="yellow"> Contenido del testo da selezionare </p>