Einzelnen Beitrag anzeigen
  #1 (permalink)  
Alt 22.01.2011, 16:38
DonL DonL ist offline
Neuer Benutzer
neuer user
Thread-Ersteller
 
Registriert seit: 22.01.2011
Beiträge: 1
DonL befindet sich auf einem aufstrebenden Ast
Standard Einbindung von frei erhältlichen Scripten - CSS Problem

Hallo,
ich habe ein riesieges Problem.
Ich möchte meine Homepage bisschen umgestalten (modernisieren). Im Internet habe ich nun einige cool JQUERY Scripte gefunden wie z.B. einen Foto Slider, Tabs, Login Slider usw.
Das Problem ist nur, dass alle eine eigene vorgefertigte CSS Datei haben, die u.a. den <body>, <h1>, <h2>, <ul>, <li> usw. festlegen. Der ganze HTML Aufbau läuft dann über <div> und <ul>.

Wen ich nun die Scripte einbinde, die CSS und JS, funktioniert nur das erste ding. Der Rest wird von den vordefinierten Werten aus einer anderen Datei so beeinflusst, dass ich das tool nicht nutzen kann oder alles zerhackt ist.

Nun meine Frage. Gibt es im CSS eine Möglichkeit dieses nur für bestimmte Abschnitte zu laden und dann wieder zu schließen?
Was ich meine ist, ob ich die ganzen Scripte nicht in separate Dateien stecke, diese dann per PHP reinziehe (include) und die CSS nur für diese Datei gilt.
Somit wären alle Einstellung der CSS Dateien nur für einen bestimmten Abschnitt und würden sich nicht gegenseitig beeinflussen.

Was CSS und den ganzen JS Kram betrifft, so bin ich ein richtiger Noob. Etwas Grundwissen ist da um meine Pläne zu realisieren, aber so wie die neuwertigen Scripte im CSS und JS gecodet sind, dass ist schon zu hoch für mich. Ich hab keinen Plan wie ich die CSS Dateien umschreiben könnte damit alle Scripte in der index.php laufen.

Anbei schicke ich zwei Beispiel CSS Dateien damit Ihr auch sehen könnt, wie diese gecodet worden sind:

Das ist die CSS Datei des Foto Sliders, welchen ich gerne verwenden würde:
Code:
body {
	background: #1d1d1d;
	margin: 0; padding: 0;
	font: 10px normal Verdana, Arial, Helvetica, sans-serif;
}
* {margin: 0; padding: 0; outline: none;}
img {border: none;}
h1 {
	font: 3em normal Verdana, "Times New Roman", Times, serif;
	color: #fff;
	text-align: center;
	background: url(images/h1_bg.gif) no-repeat;
	text-indent: -99999px;
	margin: 100px 0 10px;
}
.container {
	overflow: hidden;
	width: 900px;
	margin: 0 auto;
}
#main {
	padding: 10px;
	background: #f0f0f0;
	border: 1px solid #ccc;
}
a {color: #fff;}

/*--Main Image Preview--*/
.main_image {
	width: 598px; height: 380px;
	float: left;
	background: #333;
	position: relative;
	overflow: hidden;
	color: #fff;
}
.main_image h2 {
	font-size: 2em;
	font-weight: normal;
	margin: 0 0 5px;	padding: 10px;
}
.main_image p {
	font-size: 1.2em;
	padding: 10px;	margin: 0;
	line-height: 1.6em;
}
.block small { 
	font-size: 1em; 
}
.main_image .block small {margin-left: 10px;}
.main_image .desc{
	position: absolute;
	bottom: 0;	left: 0;
	width: 100%;
	display: none;
}
.main_image .block{
	width: 100%;
	background: #111;
	border-top: 1px solid #000;
}
.main_image a.collapse {
	background: url(images/btn_collapse.gif) no-repeat left top;
	height: 27px; width: 93px;
	text-indent: -99999px;
	position: absolute; 
	top: -27px; right: 20px; 
}
.main_image a.show {background-position: left bottom;} 


.image_thumb {
	float: left;
	width: 299px;
	background: #f0f0f0;
	border-right: 1px solid #fff;
	border-top: 1px solid #ccc;
}
.image_thumb img {
	border: 1px solid #ccc; 
	padding: 5px; 
	background: #fff; 
	float: left;
}
.image_thumb ul {
	margin: 0; padding: 0;
	list-style: none;
}
.image_thumb ul li{
	margin: 0; padding: 12px 10px;
	/*background: #f0f0f0 url(images/nav_a.gif) repeat-x;*/
	width: 279px;
	float: left;
	border-bottom: 1px solid #ccc;
	border-top: 1px solid #fff;
	border-right: 1px solid #ccc;
}
.image_thumb ul li.hover {
	background: #ddd;
	cursor: pointer;
}
.image_thumb ul li.active {
	background: #ddd;
	cursor: default;
}
html .image_thumb ul li h2 {
	font-size: 1.5em; 
	margin: 5px 0; padding: 0;
}
.image_thumb ul li .block {
	float: left; 
	margin-left: 10px;
	padding: 0;
	width: 170px;
}	
.image_thumb ul li p{display: none;}


Das ist die CSS Datei des Login Sliders:
Code:
html, body {border: 0; margin: 0; padding: 0;}

body {
  	font: 85%/0.9 arial, helvetica, sans-serif;
	background: #99A989 url(../images/bg.jpg) repeat 0 0;
  	line-height: 130%;
  	width: 100%;
  	min-width: 970px;
  	color: black;
}

a {
	color: #0099CC;
	text-decoration: none;
}

a:hover {
	color: #00CCFF;
}

a img {
  border: none;/*remove border for linked images*/
}
h1 {
	font-size: 1.6em;
	height: 20px;
	padding-top: 0;
}

h2{
	font-size: 1.2em;
	height: 20px;
	padding-top: 0;
}

.highlight {background-color:#FF9D9D;border-bottom:#F30 1px solid;border-top:#F30 1px solid;padding: 4px 10px}

/***** Main Layout ****/
#container {
  	width: 100%;
  	height: 100%;
  	text-align: center;/* IE fix to center the page */
}

#content {
  	width: 740px;
  	margin: 0 auto;/* center the page in Firefox */
  	text-align: left;
	padding: 20px;
}


/***** clearfix *****/
.clear {clear: both;height: 0;line-height: 0;}
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
.clearfix {display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix {height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */
.clearfix {height: 1%;}
.clearfix {display: block;}

/* Panel Tab/button */
.tab {
  	background: url(../images/tab_b.png) repeat-x 0 0;
	height: 42px;
	position: relative;
    top: 0;
    z-index: 999;
}

.tab ul.login {
	display: block;
	position: relative;
  	float: right;
  	clear: right;
  	height: 42px;
	width: auto;
  	font-weight: bold;
	line-height: 42px;
	margin: 0;
	right: 150px;
  	color: white;
  	font-size: 80%;
	text-align: center;
}

.tab ul.login li.left {
  	background: url(../images/tab_l.png) no-repeat left 0;
  	height: 42px;
	width: 30px;
	padding: 0;
	margin: 0;
  	display: block;
	float: left;
}

.tab ul.login li.right {
  	background: url(../images/tab_r.png) no-repeat left 0;
  	height: 42px;
	width: 30px;
	padding: 0;
	margin: 0;
  	display: block;
	float: left;
}

.tab ul.login li {
 	text-align: left;
  	padding: 0 6px;
	display: block;
	float: left;
	height: 42px;
  	background: url(../images/tab_m.png) repeat-x 0 0;
}

.tab ul.login li a {
	color: #15ADFF;
}

.tab ul.login li a:hover {
	color: white;
}

.tab .sep {color:#414141}

.tab a.open, .tab a.close {
	height: 20px;
	line-height: 20px !important;
	padding-left: 30px !important;
	cursor: pointer;
	display: block;
	width: 100px;
	position: relative;
	top: 11px;
}

.tab a.open {background: url(../images/bt_open.png) no-repeat left 0;}
.tab a.close {background: url(../images/bt_close.png) no-repeat left 0;}
.tab a:hover.open {background: url(../images/bt_open.png) no-repeat left -19px;}
.tab a:hover.close {background: url(../images/bt_close.png) no-repeat left -19px;}

/* sliding panel */
#toppanel {
    position: absolute;   /*Panel will overlap  content */
    /*position: relative;*/   /*Panel will "push" the content down */
    top: 0;
    width: 100%;
    z-index: 999;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

#panel {
	width: 100%;
	height: 270px;
	color: #999999;
	background: #272727;
	overflow: hidden;
	position: relative;
	z-index: 3;
	display: none;
}

#panel h1 {
	font-size: 1.6em;
	padding: 5px 0 10px;
	margin: 0;
	color: white;
}

#panel h2{
	font-size: 1.2em;
	padding: 10px 0 5px;
	margin: 0;
	color: white;
}

#panel p {
	margin: 5px 0;
	padding: 0;
}

#panel a {
	text-decoration: none;
	color: #15ADFF;
}

#panel a:hover {
	color: white;
}

#panel a-lost-pwd {
	display: block;
	float: left;
}

#panel .content {
	width: 960px;
	margin: 0 auto;
	padding-top: 15px;
	text-align: left;
	font-size: 0.85em;
}

#panel .content .left {
	width: 280px;
	float: left;
	padding: 0 15px;
	border-left: 1px solid #333;
}

#panel .content .right {
	border-right: 1px solid #333;
}

#panel .content form {
	margin: 0 0 10px 0;
}

#panel .content label {
	float: left;
	padding-top: 8px;
	clear: both;
	width: 280px;
	display: block;
}

#panel .content input.field {
	border: 1px #1A1A1A solid;
	background: #414141;
	margin-right: 5px;
	margin-top: 4px;
	width: 200px;
	color: white;
	height: 16px;
}

#panel .content input:focus.field {
	background: #545454;
}

/* BUTTONS */
/* Login and Register buttons */
#panel .content input.bt_login,
#panel .content input.bt_register {
	display: block;
	float: left;
	clear: left;
	height: 24px;
	text-align: center;
	cursor: pointer;
	border: none;
	font-weight: bold;
	margin: 10px 0;
}

#panel .content input.bt_login {
	width: 74px;
	background: transparent url(../images/bt_login.png) no-repeat 0 0;
}

#panel .content input.bt_register {
	width: 94px;
	color: white;
	background: transparent url(../images/bt_register.png) no-repeat 0 0;
}

#panel .lost-pwd {
	display: block;
	float:left;
	clear: right;
	padding: 15px 5px 0;
	font-size: 0.95em;
	text-decoration: underline;
}
Die Einstellung für <body> und html kann ich ohne probleme auskommentieren. Wen ich aber an den Einstellungen der <ul>, <li>, <h1> usw. was ändere, funktioniert das ganze dann nicht mehr so wie es sollte.

Über eine Hilfe wäre ich sehr dankbar, denn alles was ich bisher mit meinem "kleinen" Wissen versucht habe zu machen, hat nichts gebracht.

Gruß
Mit Zitat antworten
Sponsored Links