Autor Beitrag
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Mi 28.03.07 22:18 
Hi,

ich bin grad total am verzweifeln mit HTML/CSS...
Alles was ich möchte ist, das ein Bild zwischen zwei worten gezeigt wird, allerdings ohne verwendung des <IMG>-Tags.

Das Problem ist, ich kenne die url zu dem Bild nur in der CSS Datei, nicht im HTML Code (bitte nicht fragen wieso, ist einfach so ;) )

Deshalb dachte ich, mache ich einfach sowas hier in css:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
hr.separator
{
    width: 31px;
    height: 11px;
    border-style: none;
    background-image: url("images/separator.png");
    background-repeat: repeat;
 }

Das klappt auch, der <hr> sieht da jetzt so aus wie er soll.. nur, ein <hr> macht automatisch vorher und hinterher einen Zeilenumbruch, der muß da weg.. also hab ich noch die zeile dazu gepackt:

ausblenden Quelltext
1:
    display: inline;					


und aufeinmal ist der <hr> weg.. nichtmehr zu sehen, in allen Browsern.

Tjoa.. also das <hr> durch <div class="separator"></div> ausgetauscht und in der CSS datei angepasst.. geht, solange ich die "display: inline" zeile weglasse.. sobald die reinkommt - schwupp .. weg is alles...

und ich bin echt langsam am verzweifeln.. ich habe keine ahnung wie ich es machen soll, OHNE <IMG>-Tag und ohne Tabelle... *heul*

Aya..

_________________
Aya
I aim for my endless dreams and I know they will come true!
yukon-troll
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 60



BeitragVerfasst: Do 29.03.07 15:46 
Hallo,

versuch mal folgendes:
ausblenden XML-Daten
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
<style type="text/css">
.separator
{
    width: 31px;
    height: 11px;
    border-style: none;
    background-image: url("url_zum_Bild");
    background-repeat: repeat;
}
</style>

<body>
  <div>
     Dies ist ein Beispieltext, <span class="separator">       </span> dies ist ein Beispieltext.
  </div>
</body>


Zwischen den Tags <span> und </span> muss zumindest 1 Zeichen (oder Leerzeichen)
stehen, damit etwas dargestellt wird.

MfG Yukon-Troll
Aya Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Do 29.03.07 16:05 
Hi,

das hatte ich schon probiert... er verändert die breite nicht auf die via CSS festgelegte Breite... auch wenn ich nen x oder sonstwas reinschreib, es ist immer nur so breit wie der buchstabe :(

Aya~

PS: Ich hab es mittlerweile via Tabelle gemacht.. :autsch:

_________________
Aya
I aim for my endless dreams and I know they will come true!
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Do 29.03.07 16:37 
ausblenden XML-Daten
1:
2:
margin: 0px;
padding: 0px;


Sollte helfen.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Aya Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Do 29.03.07 16:46 
user profile iconGTA-Place hat folgendes geschrieben:
ausblenden XML-Daten
1:
2:
margin: 0px;
padding: 0px;


Sollte helfen.


tut es aber nicht, bereits probiert... der zeilenumbruch bleib :?

_________________
Aya
I aim for my endless dreams and I know they will come true!
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Do 29.03.07 16:50 
Vielleicht so ungefähr?
www.drweb.de/cssprax..._externe_links.shtml
Nur halt nicht mit Links sondern Text.

MfG
blackbirdXXX

ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1077
Erhaltene Danke: 1

Ubuntu Dapper

BeitragVerfasst: Fr 30.03.07 16:46 
Einzige Möglichkeit: floaten lassen. Macht aber fix das Layout kaputt. Ansonsten display:inline nehmen und ein !important an height dran. Funktioniert in ein paar Browsern.

_________________
Klein, schwarz und ärgert Techniker? Jumper!