• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Text über Bild

McGarrett

Neues Mitglied
Hallo Community, wollte mal fragen wie man einen Text über eine Grafik setzt...

mein code:

Code:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Bau & Gartenservice Wiedemann</title>
    <style>

      #demo {
        background-image:url(background2.jpg);
        height: 480px;
        width: 1927px;
        background-position: -20px -0px;
       
      }
      #demo2 {
        background-image:url(schreibding.jpg);
        height: 700px;
        width: 800px;
        margin: -0px 0 0 580px;
       
      }
body {
overflow-x: hidden;
}

    </style>
  </head>
<body style="margin: -22px; padding: 0px;">
    <h1></h1>
    <section id="demo"></section>
    <section id="demo2"></section>
  </body>
</html>

über der Grafik #demo2 hätte ich gerne einen text aber wie das geht keine ahnung

mfg

Moritz
 
Werbung:
Doch, ich bin neu in der ganzen Sache... hab jetzt noch eine Frage... habe jetzt ein zweites bild... aber der text will nicht über bild1...

Code:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Bau & Gartenservice Wiedemann</title>
    <style>

      #demo {
        background-image:url(backgroundnew.jpg);
        height: 400px;
        width: 2000px;
        background-position: 0px 0px;
        background-repeat:no-repeat;
      }
body
{
overflow-x: hidden;
}
    </style>
  </head>
<body style="margin: -25px; padding: -30px;">
    <h1></h1>
    <section id="demo"><a href="start.htm"><img border="0" width="300" height="79" hspace="555" vspace="114" src="logo.jpg"></a>
    <a> <img border="0" width="350" height="500" hspace="500" vspace="75" src="bild1.jpg"> </a>
    </section>
  </body>
</html>

Bitte nochmals um hilfe
 
Werbung:
Doch, ich bin neu in der ganzen Sache... hab jetzt noch eine Frage... habe jetzt ein zweites bild... aber der text will nicht über bild1...

Code:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Bau & Gartenservice Wiedemann</title>
    <style>

      #demo {
        background-image:url(backgroundnew.jpg);
        height: 400px;
        width: 2000px;
        background-position: 0px 0px;
        background-repeat:no-repeat;
      }
body
{
overflow-x: hidden;
}
    </style>
  </head>
<body style="margin: -25px; padding: -30px;">
    <h1></h1>
    <section id="demo"><a href="start.htm"><img border="0" width="300" height="79" hspace="555" vspace="114" src="logo.jpg"></a>
    <a> <img border="0" width="350" height="500" hspace="500" vspace="75" src="bild1.jpg"> </a>
    </section>
  </body>
</html>

Bitte nochmals um hilfe
Wenn über "bild1.jpg" ein Text erscheinen soll, dann binde es anstelle von <img> als Hintergrundbild von <a></a> ein.
HTML:
<a id="bild1" href="...">Text über bild1</a>
CSS:
a#bild1 {
  display:block;
  width:350px;
  height:500px;
  background:url(bild1.jpg) no-repeat;
}
 
Zurück
Oben