Newsticker mit marquee
Hallo,
ich möchte einen Newsticker auf meine Seite machen, bei dem nur interne News sind, also keine aktuellen wie Bombenanschlag in Niemalsland usw...
Da ich auf meiner Seite ein Bild als Header habe, krieg ich es nicht hin, den Fließtext oben rechts in das Header-Bild zu bekommen.
So wie ich es habe, kommt der Fließtext unter mein Bild in die Navigation und das is ja auch nicht das Wahre. Soll ich es mit z-index probieren?
Der betreffende Code ist
...
<div id="header">
<a href="http://detox-gaming.de/news/index.php" target="_blank"><img src="benny.png"></a>
<marquee scrollamount="30" scrolldelay="3">
<b>Detox-Gaming sucht immer weiter Member
</b>
</marquee>
</div>
...
ich möchte einen Newsticker auf meine Seite machen, bei dem nur interne News sind, also keine aktuellen wie Bombenanschlag in Niemalsland usw...
Da ich auf meiner Seite ein Bild als Header habe, krieg ich es nicht hin, den Fließtext oben rechts in das Header-Bild zu bekommen.
So wie ich es habe, kommt der Fließtext unter mein Bild in die Navigation und das is ja auch nicht das Wahre. Soll ich es mit z-index probieren?
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>was weiß ich?!</title>
<style type="text/css" media="screen">
body
{
margin: 0;
padding: 0;
font: 85% arial, sans-serif;
text-align: center;
background-color: #151515;
}
a:link { color: #B52C07; }
a:visited { color: #600; }
a:hover, a:active
{
color: #fff;
background-color: #B52C07;
}
a img { border: none; }
h2
{
color: #B52C07;
font: 120% georgia, times, "times new roman", serif;
font-weight: bold;
margin: 0 0 2px 0;
}
h2 a { text-decoration: none; }
h3
{
color: #CD2626;
font: 106% georgia, times, "times new roman", serif;
font-weight: bold;
margin-top: 0;
}
#container
{
margin: 1px auto;
width: 940px;
text-align: left;
background-color: #fff;
border: 1px solid #676767;
}
#header
{
height: 180px;
position: relative;
}
#mainnav
{
background-color: #CD2626;
color: #8B0000;
padding: 2px 0;
margin-bottom: 22px;
}
#mainnav ul
{
margin: 0 0 0 20px;
padding: 0;
list-style-type: none;
border-left: 1px solid #8B0000;
}
#mainnav li
{
display: inline;
padding: 0 10px;
border-right: 1px solid #8B0000;
}
#mainnav li a
{
text-decoration: none;
color: #8B0000;
}
#mainnav li a:hover
{
text-decoration: none;
color: #fff;
}
#menu
{
float: right;
width: 350px;
border-left: 1px solid #8B0000;
padding-left: 15px;
}
#menu ul
{
margin-left: 0;
padding-left: 0;
list-style-type: none;
line-height: 165%;
}
#contents
{ margin: 0 400px 40px 20px; }
#contents p
{ line-height: 165%; }
.blogentry
{ border-bottom: 1px solid #8B0000; }
#footer
{
clear: both;
color: #151515;
background-color: #CD2626;
text-align: center;
padding: 5px;
font-size: 90%;
}
</style>
</head>
<body>
<div id="container">
<div id="header">
<a href="http://detox-gaming.de/news/index.php" target="_blank"><img src="benny.png"></a>
<marquee scrollamount="30" scrolldelay="3">
<b>Detox-Gaming sucht immer weiter Member
</b>
</marquee>
</div>
<div id="mainnav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Biographie</a></li>
<li><a href="#">Projekte</a></li>
<li><a href="#">Impressum</a></li>
</ul>
</div>
<div id="menu">
<h3>Menu</h3>
<ul>
<li>Section1</li>
<li>Section2</li>
<li>Section3</li>
<li>Section4</li>
</ul>
</div>
<div id="contents">
<div class="blogentry">
<h2>Herzlich Willkommen auf meiner privaten Homepage</h2>
<p>Test Test Test Test Test Test</p><p>Test Test Test Test Test Test</p>
<p>Test Test Test Test Test Test</p><p>Test Test Test Test Test Test</p>
<p>Test Test Test Test Test Test</p><p>Test Test Test Test Test Test</p>
<p>Test Test Test Test Test Test</p><p>Test Test Test Test Test Test</p>
</div>
</div>
<div id="footer">
Copyright © www.detoxmania.info.ms 2009
</div>
</div>
</body>
</html>
|
Der betreffende Code ist
...
<div id="header">
<a href="http://detox-gaming.de/news/index.php" target="_blank"><img src="benny.png"></a>
<marquee scrollamount="30" scrolldelay="3">
<b>Detox-Gaming sucht immer weiter Member
</b>
</marquee>
</div>
...
|
|
PHP-Quelltext |
1 2 3 4 5 6 7 8 |
<div id="header">
<a href="http://detox-gaming.de/news/index.php" target="_blank"><img src="benny.png"></a>
<marquee scrollamount="30" scrolldelay="3" class="newsticker">
<b>Detox-Gaming sucht immer weiter Member
</b>
</marquee>
</div>
|
|
|
Cascading Style Sheet |
1 2 3 4 5 6 7 8 |
.newsticker {
position: absolute;
width: /* die länge muss so lange sein wie #header */;
height: 180x;
z-index: 10; /* muss höher sein als der z-index von #header */
margin-left: /* hier wieder der wert von #header */;
margin-top: /* hier wieder der wert von #header */;
}
|
So ungefähr, habs nicht getestet.
dermainzer
Imho wäre das Einfachste:
Btw: marquee ist kein HTML-Standard
|
|
HTML |
1 2 3 4 |
<div id="header"> <a href="http://detox-gaming.de/news/index.php" target="_blank"> </a> <marquee>Detox-Gaming sucht immer weiter Member</marquee> </div> |
|
|
Cascading Style Sheet |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#header
{
height:180px;
position: relative;
background:url(./benny.png);
}
#header a {
position:relative;
display:block;
width:100%;
height:100%;
z-index:0;
}
#header marquee {
position:absolute;
top:0;
right:0;
z-index:1;
font-weight:bold;
}
|
Btw: marquee ist kein HTML-Standard
~!__/
..o.o
This is Einkaufswagen.
Copy Einkaufswagen into your signature to help him on his way to world domination.
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Skittles« (8. April 2009, 11:32)
Ähnliche Themen
-
Allgemeines Forum »-
allgemeines zu html schrift
(23. Januar 2008, 22:02)
-
(X)HTML & CSS & DHTML & Javascript »-
Newsticker?
(31. August 2003, 12:37)
-
(X)HTML & CSS & DHTML & Javascript »-
Marquee link stoppen
(5. Mai 2003, 14:17)
-
(X)HTML & CSS & DHTML & Javascript »-
Marquee-Newsticker stoppen
(27. April 2003, 01:30)
-
(X)HTML & CSS & DHTML & Javascript »-
Laufender Text
(30. März 2003, 17:44)


