WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

Antwort
 
Themen-Optionen Ansicht
Alt 18.05.2003, 09:40   #1
Helmut71
Jr. Member
 
Registriert seit: 18.05.2003
Beiträge: 65


Standard Hintergrund mit css

Hallo!!

Eine Frage: Wie kann man mit css ein Hintergrundbild verwenden? Sollte sich immer wiederholen..

Hier die css-Datei (ist ein board)

BODY {
COLOR: #000000;
BACKGROUND-COLOR: #FFFFFF;
}

A {
COLOR: #000000;
FONT-FAMILY: Tahoma,Verdana,Arial;
FONT-STYLE: normal;
FONT-WEIGHT: normal;
TEXT-DECORATION: none;
}

A:visited {
COLOR: #000000;
TEXT-DECORATION: none;
}

A:hover {
COLOR: #636468;
TEXT-DECORATION: none;
}

A:active {
COLOR: #000000;
TEXT-DECORATION: none;
}

A.imp {
COLOR: #CC0000;
FONT-FAMILY: Tahoma,Verdana,Arial;
FONT-STYLE: normal;
FONT-WEIGHT: bold;
TEXT-DECORATION: none;
}

A.imp:visited {
COLOR: #CC0000;
TEXT-DECORATION: bold;
}

A.imp:hover {
COLOR: #000000;
TEXT-DECORATION: bold;
}

A.imp:active {
COLOR: #CC0000;
TEXT-DECORATION: bold;
}
FONT.small {
COLOR0:#FFFFFF;
font-family: Arial;
font-size: 1pt;
}
FONT.one {
COLOR: #000000;
font-family: Tahoma,Verdana,Arial;
font-size: 9pt;
}
FONT.two {
COLOR: #000000;
font-family: Tahoma,Verdana,Arial;
font-size: 10pt;
}
FONT.four {
COLOR: #000000;
font-family: Tahoma,Verdana,Arial;
font-size: 13pt;
}

FONT.title {
COLOR: #000000;
font-family: Tahoma,Verdana,Arial;
font-size: 13pt;
}

.table_s {
width : 600;
border : 3px none #000000;

}



.td1{
background-color: #E5E5E5;
}
.td2{
background-color: #E5E5E5;
width:216;
}

INPUT.normal {
BACKGROUND-COLOR: #E5E5E5;
BORDER-BOTTOM-COLOR: #000000;
BORDER-BOTTOM-WIDTH: 1px;
BORDER-LEFT-COLOR: #000000;
BORDER-LEFT-WIDTH: 1px;
BORDER-RIGHT-COLOR: #000000;
BORDER-RIGHT-WIDTH: 1px;
BORDER-TOP-COLOR: #000000;
BORDER-TOP-WIDTH: 1px;
COLOR: #000000;
FONT-FAMILY: Tahoma,Verdana,Arial;
FONT-SIZE: 9pt;
vertical-align: middle;
height: 19;
}

INPUT.invisible {
BACKGROUND-COLOR: #FFFFFF;
BORDER-BOTTOM-COLOR: #FFFFFF;
BORDER-BOTTOM-WIDTH: 0px;
BORDER-LEFT-COLOR: #FFFFFF;
BORDER-LEFT-WIDTH: 0px;
BORDER-RIGHT-COLOR: #FFFFFF;
BORDER-RIGHT-WIDTH: 0px;
BORDER-TOP-COLOR: #FFFFFF;
BORDER-TOP-WIDTH: 0px;
COLOR: #FFFFFF;
FONT-FAMILY: Arial;
FONT-SIZE: 10pt;
MARGIN-BOTTOM: 0px;
MARGIN-TOP: 0px;
}


INPUT.submit {
BACKGROUND-COLOR: #E5E5E5;
BORDER-BOTTOM-COLOR: #000000;
BORDER-BOTTOM-WIDTH: 1px;
BORDER-LEFT-COLOR: #000000;
BORDER-LEFT-WIDTH: 1px;
BORDER-RIGHT-COLOR: #000000;
BORDER-RIGHT-WIDTH: 1px;
BORDER-TOP-COLOR: #000000;
BORDER-TOP-WIDTH: 1px;
COLOR: #000000;
FONT-FAMILY: Tahoma,Verdana,Arial;
FONT-SIZE: 12px;
HEIGHT: 19px;
}

TEXTAREA {
BACKGROUND-COLOR: #E5E5E5;
BORDER-BOTTOM-COLOR: #000000;
BORDER-BOTTOM-WIDTH: 1px;
BORDER-LEFT-COLOR: #000000;
BORDER-LEFT-WIDTH: 1px;
BORDER-RIGHT-COLOR: #000000;
BORDER-RIGHT-WIDTH: 1px;
BORDER-TOP-COLOR: #000000;
BORDER-TOP-WIDTH: 1px;
COLOR: #000000;
FONT-FAMILY: Tahoma,Verdana,Arial;
FONT-SIZE: 10pt;
OVERFLOW-X: hidden;
OVERFLOW-Y: auto;
}
SELECT.normal {
BACKGROUND-COLOR: #E5E5E5;
font-family : Tahoma,Verdana,Arial;
FONT-SIZE: 9pt;
}

.signup1 {
background-color : #F6F6F6;
width : 18%;
vertical-align : top;
text-align : right;
}
.signup2 {
background-color : #F6F6F6;
width : 83%;
vertical-align : top;
}
.td22 {
background-image : url('../gfx/bg1.jpg');
vertical-align : top;
}
.tb1 {
margin-left: 4;
}
Helmut71 ist offline   Mit Zitat antworten
Alt 18.05.2003, 11:25   #2
Noerf
Master
 
Registriert seit: 23.11.2000
Alter: 43
Beiträge: 529


Noerf eine Nachricht über ICQ schicken
Standard

http://www.netzwelt.com/selfhtml/css...intergrund.htm
____________________________________
The knack of flying is learning how to throw yourself at the ground and miss.

Es heißt Fluglotse, ein z kommt in diesem Wort nicht vor.
Noerf ist offline   Mit Zitat antworten
Alt 19.05.2003, 07:45   #3
Helmut71
Jr. Member
 
Registriert seit: 18.05.2003
Beiträge: 65


Standard

...das hab ich ca. 1 Stunde ohne Erfolg versucht..vermutlich bin ich zu dumm dafür :-(

<body style="background-image:url(background1.gif)">

Ich weiß schon, dass es mit diesem Befehl geht, nur schaffe ich es trotzdem nicht.......
Helmut71 ist offline   Mit Zitat antworten
Alt 19.05.2003, 08:56   #4
nordbahnfredi
Inventar
 
Benutzerbild von nordbahnfredi
 
Registriert seit: 12.10.2000
Ort: Wien
Alter: 77
Beiträge: 1.963


Standard

<body background="xxx.jpg" >

schau dir in meiner hp die seite WIEN an
____________________________________
Schöne Grüße nordb@hnfredi
nordbahnfredi ist offline   Mit Zitat antworten
Alt 20.05.2003, 02:00   #5
allwissende Müllhalde
Inventar
 
Registriert seit: 28.12.2000
Beiträge: 1.693


Standard

Zitat:
Original geschrieben von Helmut71
...das hab ich ca. 1 Stunde ohne Erfolg versucht..vermutlich bin ich zu dumm dafür :-(

<body style="background-image:url(background1.gif)">

Ich weiß schon, dass es mit diesem Befehl geht, nur schaffe ich es trotzdem nicht.......

<body STYLE="background-image:url('background1.gif');">

vielleicht so ?
vorausgesetzt natürlich das Bild heißt so wird genauso geschrieben und liegt im selben Ordner
____________________________________
Nordick-Wogging
Dumm-ness boomt
Ihr Fengshui Berater
Eurofighter abfangen !
allwissende Müllhalde ist offline   Mit Zitat antworten
Alt 21.05.2003, 10:00   #6
grindkind
Newbie
 
Registriert seit: 21.05.2003
Beiträge: 7


Standard

Die Wege des CSS sind unheimlich!

Versuchs mal ohne die background-color. Wenn sich das Bild immer wiederholen soll, brauchst du sie eh nicht.

Außerdem kannst versuchen, nicht nur

background-image:url(datei);

anzugeben, sondern auch folgendes:

background-position:0px 0px;
------
Außerdem pass auf, dass die css-Datei im selben Ordner wie das Bild liegt, sonst müsstest du den Pfad ändern!

mfg
grindkind ist offline   Mit Zitat antworten
Alt 21.05.2003, 13:59   #7
_m3
Inventar
 
Registriert seit: 24.09.2001
Beiträge: 7.335


Standard

RTFM: http://www.w3.org/TR/CSS2/colors.htm...ckground-image

Code:
'background-image'
    Value:  	<uri> | none | inherit
    Initial:  	none
    Applies to:  	all elements
    Inherited:  	no
    Percentages:  	N/A
    Media:  	visual

This property sets the background image of an element. When setting a background image, authors should also specify a background color that will be used when the image is unavailable. When the image is available, it is rendered on top of the background color. (Thus, the color is visible in the transparent parts of the image).

Values for this property are either <uri>, to specify the image, or 'none', when no image is used.

Example(s):
<style>
BODY { background-image: url("marble.gif") }
P { background-image: none }
</style>


'background-repeat'
    Value:  	repeat | repeat-x | repeat-y | no-repeat | inherit
    Initial:  	repeat
    Applies to:  	all elements
    Inherited:  	no
    Percentages:  	N/A
    Media:  	visual

If a background image is specified, this property specifies whether the image is repeated (tiled), and how. All tiling covers the content and padding areas of a box. Values have the following meanings:

repeat
    The image is repeated both horizontally and vertically. 
repeat-x
    The image is repeated horizontally only. 
repeat-y
    The image is repeated vertically only. 
no-repeat
    The image is not repeated: only one copy of the image is drawn. 

Example(s):

<style>
BODY { 
  background: white url("pendant.gif");
  background-repeat: repeat-y;
  background-position: center;
}
</style>
____________________________________
Weiterhin zu finden auf http://martin.leyrer.priv.at , http://twitter.com/leyrer , http://www.debattierclub.net/ , http://www.tratschen.at/ und via Instant Messaging auf Jabber: m3 <ät> cargal.org .
_m3 ist offline   Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 07:00 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag