vue Design dynamique
Kommunauty
Connexion
Inscription

Design dynamique


Darkevil Messages : 221

Voila, je voudrais bien faire un design dynamique (en php+css), le problème, c'est qu'avec moi, il refuse le php. Comment faire?

Voici mon code :

<?php
require_once(dirname(__FILE__) . "/common.php");
$prog = '50' ;
?>

/* Template created by http://www.ourtuts.com & modified by G4lAcTiC SilvR */

/* === I/GLOBAL ================= */

/* ===== A/Font Styles ========== */

@font-face {
font-family: 'PTSansRegular';
src: url('fonts/pt-sans/PTS55F-webfont.eot');
src: url('fonts/pt-sans/PTS55F-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/pt-sans/PTS55F-webfont.woff') format('woff'), url('fonts/pt-sans/PTS55F-webfont.ttf') format('truetype'), url('fonts/pt-sans/PTS55F-webfont.svg#PTSansRegular') format('svg');
font-weight: normal;
font-style: normal;
}



/* ===== B/General Styles ======= */

html,
div,
span,
head,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
a,
font,
img,
small,
strong,
ol,
ul,
li {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
background: transparent;
}

ol,
ul { list-style: none }

blockquote,
q { quotes: none }

body {
font-family: PTSansRegular;
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
line-height: 1;
}

body { background: #aaaaaa url(../images/bg.jpg) repeat scroll 0 0 }

.container {
width: 885px;
margin: 0 auto;
}

#main {
background-color:#3b3b3b;
width:802px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 0px 10px 3px ;
-moz-box-shadow: 0px 0px 10px 3px ;
box-shadow: 0px 0px 10px 3px ;
border:1px solid;
border-color:#252525;
margin: 0 auto;
height: 430px;
}







/* === II/CONTENT =============== */

/* ===== A/Header =============== */

#header {
margin: auto;
margin-top: 80px;
margin-bottom: 10px;
height: 50px;
}

#logo {
position: relative;
float: left;
padding-left: 42px;
}

#contact_details {
float: right;
color: #333333;
font-size: 13px;
font-style: normal;
line-height: 22px;
padding-right: 42px;
text-align: right;
}

#contact_details a {
color: #333333;
font-size: 13px;
text-decoration: none;
letter-spacing: 0.5px;
}



/* ===== B/Body ================= */

#content { padding: 10px 44px }

.text {
text-align: center;
margin-top: 40px;
padding-bottom: 40px;
border-bottom: 1px solid #262626;
width:798px;
margin-left:-42px

}

.text h2 {
font-size: 30px;
color: #e5e5e5;
font-style: normal;
font-variant: normal;
font-weight: lighter;
letter-spacing: 2px;
}

.counter {
width: 798px;
height: 150px;
border-top: 1px solid #4f4f4f;
border-bottom: 1px solid #262626;
text-align: center;
margin-left:-42px
}

.counter h3 {
font-size: 14px;
color: #e5e5e5;
font-style: normal;
font-variant: normal;
font-weight: lighter;
letter-spacing: 1px;
margin-top: 20px;
}

.details {
border-top: 1px solid #4f4f4f;
height: 120px;
margin-left:-42px;
width: 798px;
}

#sliderwrap {
float: left;
text-align: center;
width: 600px;
overflow: hidden;
position: relative;
height: 110px;
margin-left: 10px;
}

#slidertext h3 {
font-size: 14px;
font-style: normal;
font-weight: lighter;
color: #e5e5e5;
letter-spacing: 1px;
margin-bottom: 15px;
}

#slidertext p {
font-size: 12px;
font-style: normal;
font-weight: normal;
color: #CCCCCC;
padding: 0 25px;
}
#slidertext {
margin-top: 15px;
float: left;
width: 600px;
overflow: hidden;
position: relative;
}

#slidertext li {
overflow: hidden;
position: relative;
width: 600px;
height: 100px;
}

#slidertext ul { width: 600px }

.social {
position: relative;
text-align: center;
padding-top: 10px;
}

.social a {
width: 48px;
height: 48px;
margin-right: 20px;
text-indent: -9999px;
display: inline-block;
z-index: 1000;
}

#slidertext ul li a.twitter { background: url(../images/twitter.png) no-repeat scroll 0 0 }

#slidertext ul li a.rss { background: url(../images/rss.png) no-repeat scroll 0 0 }

#slidertext ul li a.facebook { background: url(../images/facebook.png) no-repeat scroll 0 0 }

#slidertext ul li a.stumbleupon { background: url(../images/stumbleupon.png) no-repeat scroll 0 0 }

#subscribeform {
margin-top: 20px;
margin-left: 135px;
}

input#ipt {
width: 237px;
height: 28px;
border: 0 none;
padding:0 10px;
color: #868686;
float: left;
margin-right: 10px;
line-height: 40px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
border-left:1px solid #171717;
border-top:1px solid #171717;
border-right:1px solid #171717;
border-bottom:1px solid #7c7c7c;
background-color:#2c2c2c;
font-size:23px;
-webkit-box-shadow: inset 0px 1px 5px 0px rgba(0, 0, 0, 1);
-moz-box-shadow: inset 0px 1px 5px 0px rgba(0, 0, 0, 1);
box-shadow: inset 0px 1px 5px 0px rgba(0, 0, 0, 0.6);
}
input#ipt:hover{
background-color: #3c3c3c;
}

input#submit {
width: 92px;
height: 43px;
margin-top: -15px;
border: 0 none;
cursor: pointer;
color: #fff;
float: left;
font-weight: bold;
text-shadow: 1px 1px 0px #393939;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
border-left:1px solid #113158;
border-top:1px solid #113158;
border-right:1px solid #113158;
border-bottom:1px solid #113158;
font-size:20px;
background: rgb(150,215,234); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzk2ZDdlYSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjIlIiBzdG9wLWNvbG9yPSIjOTZkN2VhIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMyUiIHN0b3AtY29sb3I9IiMyZGFlZDUiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjM2I3M2FlIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
background: -moz-linear-gradient(top,  rgba(150,215,234,1) 0%, rgba(150,215,234,1) 2%, rgba(45,174,213,1) 3%, rgba(59,115,174,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(150,215,234,1)), color-stop(2%,rgba(150,215,234,1)), color-stop(3%,rgba(45,174,213,1)), color-stop(100%,rgba(59,115,174,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(150,215,234,1) 0%,rgba(150,215,234,1) 2%,rgba(45,174,213,1) 3%,rgba(59,115,174,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(150,215,234,1) 0%,rgba(150,215,234,1) 2%,rgba(45,174,213,1) 3%,rgba(59,115,174,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(150,215,234,1) 0%,rgba(150,215,234,1) 2%,rgba(45,174,213,1) 3%,rgba(59,115,174,1) 100%); /* IE10+ */
background: linear-gradient(top,  rgba(150,215,234,1) 0%,rgba(150,215,234,1) 2%,rgba(45,174,213,1) 3%,rgba(59,115,174,1) 100%); /* W3C */
filter: progidXImageTransform.Microsoft.gradient( startColorstr='#96d7ea', endColorstr='#3b73ae',GradientType=0 ); /* IE6-8 */

}
input#submit:hover {
background: rgb(185,221,232); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2I5ZGRlOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjIlIiBzdG9wLWNvbG9yPSIjYjlkZGU4IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMyUiIHN0b3AtY29sb3I9IiM0ZWI2ZDMiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNjY4OWFkIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
background: -moz-linear-gradient(top,  rgba(185,221,232,1) 0%, rgba(185,221,232,1) 2%, rgba(78,182,211,1) 3%, rgba(102,137,173,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(185,221,232,1)), color-stop(2%,rgba(185,221,232,1)), color-stop(3%,rgba(78,182,211,1)), color-stop(100%,rgba(102,137,173,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(185,221,232,1) 0%,rgba(185,221,232,1) 2%,rgba(78,182,211,1) 3%,rgba(102,137,173,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(185,221,232,1) 0%,rgba(185,221,232,1) 2%,rgba(78,182,211,1) 3%,rgba(102,137,173,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(185,221,232,1) 0%,rgba(185,221,232,1) 2%,rgba(78,182,211,1) 3%,rgba(102,137,173,1) 100%); /* IE10+ */
background: linear-gradient(top,  rgba(185,221,232,1) 0%,rgba(185,221,232,1) 2%,rgba(78,182,211,1) 3%,rgba(102,137,173,1) 100%); /* W3C */
filter: progidXImageTransform.Microsoft.gradient( startColorstr='#b9dde8', endColorstr='#6689ad',GradientType=0 ); /* IE6-8 */
}
input#submit:active {
background: rgb(102,137,173); /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzY2ODlhZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9Ijk3JSIgc3RvcC1jb2xvcj0iIzRlYjZkMyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9Ijk4JSIgc3RvcC1jb2xvcj0iI2I5ZGRlOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNiOWRkZTgiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top,  rgba(102,137,173,1) 0%, rgba(78,182,211,1) 97%, rgba(185,221,232,1) 98%, rgba(185,221,232,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(102,137,173,1)), color-stop(97%,rgba(78,182,211,1)), color-stop(98%,rgba(185,221,232,1)), color-stop(100%,rgba(185,221,232,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(102,137,173,1) 0%,rgba(78,182,211,1) 97%,rgba(185,221,232,1) 98%,rgba(185,221,232,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(102,137,173,1) 0%,rgba(78,182,211,1) 97%,rgba(185,221,232,1) 98%,rgba(185,221,232,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(102,137,173,1) 0%,rgba(78,182,211,1) 97%,rgba(185,221,232,1) 98%,rgba(185,221,232,1) 100%); /* IE10+ */
background: linear-gradient(top,  rgba(102,137,173,1) 0%,rgba(78,182,211,1) 97%,rgba(185,221,232,1) 98%,rgba(185,221,232,1) 100%); /* W3C */
filter: progidXImageTransform.Microsoft.gradient( startColorstr='#6689ad', endColorstr='#b9dde8',GradientType=0 ); /* IE6-8 */
}


/* ===== C/Footer & Copyright === */

.copyright {
text-align: center;
margin-top: 10px;
font-size: 12px;
margin-bottom: 50px;
}







/* === III/CSS3 ================= */

/* ===== A/Right Arrow ========== */

a.prev {
float: left;
margin-left: -36px;
margin-top: 51px;
border-color: transparent;
border-style:solid;
border-width:18px;
width:0;
height:0;
}
.prev2 {
float: left;
margin-left: 51px;
margin-top: 51px;
border-color: transparent #868686 transparent transparent;
border-style:solid;
border-width:18px;
width:0;
height:0;
}
.prev3 {
float: left;
margin-left: -16px;
margin-top: 61px;
border-color: transparent #3b3b3b transparent transparent;
border-style:solid;
border-width:8px;
width:0;
height:0;
}



/* ===== B/Left Arrow =========== */

a.next {
float: right;
margin-right: 51px;
margin-top: -35px;
border-color: transparent;
border-style:solid;
border-width:18px;
width:0;
height:0;
}
.next2 {
float: right;
margin-right: 51px;
margin-top: 51px;
border-color: transparent transparent transparent #868686;
border-style:solid;
border-width:18px;
width:0;
height:0;
}
.next3 {
float: right;
margin-top: -26px;
margin-right: 71px;
border-color: transparent transparent transparent #3b3b3b;
border-style:solid;
border-width:8px;
width:0;
height:0;
}



/* ===== C/Progress Bar ========= */

#prog h1{
color: white;
margin: 22px 0 0 0;
font-size: 24px;
}
#prog {
list-style:none;
padding-top:30px;
width:642px;
float:left;
position:relative;
font-size:12px;
margin: 0px 0px 0px 80px;
}

#prog li {
height:71px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border-left:1px solid #171717;
border-top:1px solid #171717;
border-right:1px solid #171717;
border-bottom:1px solid #7c7c7c;
background-color:#2c2c2c;
-webkit-box-shadow: inset 0px 3px 4px 0px rgba(0, 0, 0, 0.6);
-moz-box-shadow: inset 0px 3px 4px 0px rgba(0, 0, 0, 0.6);
box-shadow: inset 0px 2px 8px 0px rgba(0, 0, 0, 0.6);
}

#prog li em {
position:relative;
top:-30px;

}

.expand {
height:70px;
margin:1px;
background:#1f98d7;
position:absolute;
-webkit-box-shadow: inset 2px 0px 4px 0px rgba(17, 84, 115, 1);
-moz-box-shadow: inset 2px 0px 4px 0px rgba(17, 84, 115, 1);
box-shadow: inset 2px 0px 4px 0px rgba(17, 84, 115, 1);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
margin: 0px 0px 0px -320px;
width: <?=prog; ?>%;
}


.progress    {  -moz-animationrogress 3s ease-out;    -webkit-animationrogress 3s ease-out;    }

@-moz-keyframes progress    { 0%  { width:0px;} 100%{ width:<?=prog; ?>%;}  }

@-webkit-keyframes progress    { 0%  { width:0px;} 100%{ width:<?=prog; ?>%;}  }



Comme vous pouvez le voir en fin de code, la taille et le pourcentage sont extensible (), mais il refuse de changer.

A pour les personnes qui souhaitent comment utiliser du php dans un css, mettez ceci dans le .htaccess :

AddHandler application/x-httpd-php5 .css

Cordialement, Darkevil

dimanche 26 février 2012

Lucas Messages : 830

Désolé de ne pas avoir répondu, essaye de ne pas utiliser de .htaccess, de renommer ton css en .php,

et de mettre en haut de ce-dernier :

header("Content-type: text/css");
samedi 3 mars 2012

Darkevil Messages : 221

La c'est tout le design qui part en sucette =)

samedi 3 mars 2012

Lucas Messages : 830

Ah. x)

Et qu'est-ce que contient common.php ?

samedi 3 mars 2012

Darkevil Messages : 221

Toutes les redirection pour que tout fonctionne ( connections BdD, variables, fonction, define et tout le reste)

samedi 3 mars 2012 (Dernière édition dimanche 4 mars 2012)

Répondre Pour répondre, tu dois d'abord t'inscrire rapidement sur Kommunauty. Rejoins-nous vite !