
<a href="#" target="_blank">
<div id="T1">
<img src="gfx/01.gif" width="765" height="15" alt="">
</div>
#T1 {
position:absolute;
left:0px;
top:0px;
width:765px;
height:15px;
#T1 {
background: url(gfx/01.gif) no-repeat;
position:absolute;
left:0px;
top:0px;
width:765px;
height:15px;
body {
text-align:center;
background:url(gfx/1.jpg) repeat;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="Shortcut icon" href="http://www.iv.pl/image/20107.jpeg" />
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2"/>
<title>Portfolio</title>
</head>
<body>
<div id="T1">
</div>
<div id="T2">
</div>
<div id="T3">
</div>
<div id="T4">
</div>
<div id="T5">
</div>
<div id="T6">
</div>
<div id="T7">
</div>
<div id="T8">
</div>
<div id="T9">
</div>
<div id="T10">
</div>
<div id="T11">
</div>
<div id="T12">
</div>
<div id="T13">
</div>
<div id="T14">
</div>
<div id="T15">
</div>
<div id="T16">
</div>
<div id="T17">
</div>
<div id="T18">
</div>
<div id="T19">
</div>
<div id="T20">
</div>
<div id="T26">
</div>
<div id="T27">
</div>
<div id="T28">
</div>
</body>
</html>
<style type="text/css">
<!--
body {
background:url(gfx/1.jpg) repeat;
width:652px;
margin:0 auto;
padding: 0;
text-align:center
}
#T1 {
position:absolute;
left:0px;
top:0px;
width:652px;
height:15px;
background:url(gfx/01.gif) no-repeat;
}
#T2 {
position:absolute;
left:0px;
top:15px;
width:45px;
height:113px;
background:url(gfx/02.gif) no-repeat;
}
#T3 {
position:absolute;
left:45px;
top:15px;
width:567px;
height:25px;
background:url(gfx/03.gif) no-repeat;
}
#T4 {
position:absolute;
left:612px;
top:15px;
width:40px;
height:747px;
background:url(gfx/04.gif) no-repeat;
}
#T5 {
position:absolute;
left:45px;
top:40px;
width:567px;
height:12px;
background:url(gfx/05.gif) no-repeat;
}
#T6 {
position:absolute;
left:45px;
top:52px;
width:264px;
height:63px;
background:url(gfx/06.jpg) no-repeat;
}
#T7 {
position:absolute;
left:309px;
top:52px;
width:303px;
height:76px;
background:url(gfx/07.gif) no-repeat;
}
#T8 {
position:absolute;
left:45px;
top:115px;
width:264px;
height:13px;
background:url(gfx/08.gif) no-repeat;
}
#T9 {
position:absolute;
left:0px;
top:128px;
width:36px;
height:634px;
background:url(gfx/09.gif) no-repeat;
}
#T10 {
position:absolute;
left:36px;
top:128px;
width:393px;
height:154px;
background:url(gfx/10.jpg) no-repeat;
}
#T11 {
position:absolute;
left:429px;
top:128px;
width:10px;
height:634px;
background:url(gfx/11.gif) no-repeat;
}
#T12 {
position:absolute;
left:439px;
top:128px;
width:173px;
height:154px;
background:url(gfx/12.gif) no-repeat;
}
#T13 {
position:absolute;
left:36px;
top:282px;
width:393px;
height:12px;
background:url(gfx/13.gif) no-repeat;
}
#T14 {
position:absolute;
left:439px;
top:282px;
width:173px;
height:480px;
background:url(gfx/14.gif) no-repeat;
}
#T15 {
position:absolute;
left:36px;
top:294px;
width:228px;
height:33px;
background:url(gfx/15.jpg) no-repeat;
}
#T16 {
position:absolute;
left:264px;
top:294px;
width:165px;
height:60px;
background:url(gfx/16.gif) no-repeat;
}
#T17 {
position:absolute;
left:36px;
top:327px;
width:228px;
height:27px;
background:url(gfx/17.gif) no-repeat;
}
#T18 {
position:absolute;
left:36px;
top:354px;
width:9px;
height:408px;
background:url(gfx/18.gif) no-repeat;
}
#T19 {
position:absolute;
left:45px;
top:354px;
width:384px;
height:251px;
background:url(gfx/19.gif) no-repeat;
}
#T20 {
position:absolute;
left:45px;
top:605px;
width:384px;
height:80px;
background:url(gfx/20.gif) no-repeat;
}
#T26 {
position:absolute;
left:0px;
top:641px;
width:145px;
height:121px;
background:url(gfx/26.gif) no-repeat;
}
#T27 {
position:absolute;
left:145px;
top:641px;
width:281px;
height:121px;
background:url(gfx/27.gif) no-repeat;
}
#T28 {
position:absolute;
left:426px;
top:641px;
width:226px;
height:121px;
background:url(gfx/28.gif) no-repeat;
}
-->
</style>
body {
position: relative;
background:url(gfx/1.jpg) repeat;
width:652px;
margin:0 auto;
padding: 0;
text-align:center
}
<style type="text/css">
<!--
-->
</style>
w head
<?php
if(isset($_GET['css'])){
switch ($_GET['css']) {
case 'red':
$stylesheet = '<link rel="stylesheet" type="text/css" href="red.css">';
$_SESSION['switchcss']=$stylesheet;
break;
case 'yellow':
$stylesheet = '<link rel="stylesheet" type="text/css" href="yellow.css">';
$_SESSION['switchcss']=$stylesheet;
break;
case 'black':
$stylesheet = '<link rel="stylesheet" type="text/css" href="black.css">';
$_SESSION['switchcss']=$stylesheet;
break;
// Our default stylesheet
default:
$stylesheet = '<link rel="stylesheet" type="text/css" href="blue.css">';
$_SESSION['switchcss']=$stylesheet;
}
}
?>
<?php echo ($_SESSION['switchcss'])? $_SESSION['switchcss']: '<link href="blue.css" type="text/css" rel="stylesheet">';?>
w body
Select <a href="<?php echo $_SERVER['PHP_SELF']; ?>?css=red">[red]</a> | <a href="<?php echo $_SERVER['PHP_SELF']; ?>?css=default">[blue]</a> | <a href="<?php echo $_SERVER['PHP_SELF']; ?>?css=yellow">[yellow]</a> | <a href="<?php echo $_SERVER['PHP_SELF']; ?>?css=black">[black]</a>
to zmienna $styl='?css=red', a jeśli wybioręcase 'red':
to zmienna $styl='?css=yellow'. I wtedy tylko do każdego linku dodał bym zmienną $styl.case 'yellow':
Powróć do Grafika & Webmastering
Użytkownicy przeglądający to forum: Brak zarejestrowanych użytkowników oraz 3 gości