Anzeige - [Interessiert an einer Anzeige?]
(?) Tags raten (?) (edit)
 
Reply to this topicStart new topicStart Poll
> Abstand formatieren in Listen-Element
Webi
Geschrieben am: So 15.04.2007, 12:27
Report PostQuote Post

AyomRank 6
************

Gruppe: Member (aktiv)
Beiträge: 646
Mitglied seit: 28.03.2004


Hallo zusammen

Habe mal wieder ein CSS-Problem. Möchte in jeder Zeile das Datum und den nachfolgenden Text so formatieren, dass das Datum eine Länge von z.B. 50px und der Text eine Länge von 300px einnimmt. Wie kann ich das am einfachsten machen?


<ul style="list-style-type:none;">
<li><a href="xxx">14.4.2007 Text1Text1Text1Text1</a></li>
<li><a href="yyy">27.3.2007 Text2Text2Text2Text2</a></li>
</ul>

Danke und Gruss
Roland


--------------------
Top
PMEmail Poster
Top
 
 
André Griepenburg
Andre Griepenburg Internetdienstleistungen
#2 Geschrieben am: So 15.04.2007, 12:55 (+00:28)
Report PostQuote Post

AyomRank 6
************

Gruppe: Member (aktiv)
Beiträge: 762
Mitglied seit: 29.08.2006


Mein Vorschlag (ohne Garantie das es geht):


CODE

<ul style="list-style-type:none;">
<li><a href="xxx"><span class="datum">14.4.2007</span> <span class="text">Text1Text1Text1Text1</span></a></li>
<li><a href="yyy"><span class="datum">27.3.2007</span> <span class="text">Text2Text2Text2Text2</a></span></li>
</ul>



Und dazu dann das entsprechende CSS:
CODE

.datum {
   width:50px;
}
.test {
   width:300px;
}


--------------------
Top
PMEmail PosterUsers WebsiteICQ
Top
 
Antoine Johannes
office-blog.ch
#3 Geschrieben am: So 15.04.2007, 15:27 (+02:31)
Report PostQuote Post

AyomRank 5
**********

Gruppe: Member (aktiv)
Beiträge: 449
Mitglied seit: 14.07.2004


so
CODE

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ul xmlns="http://www.w3.org/1999/xhtml">

<head>
 <title></title>
 <meta name="GENERATOR" content="Quanta Plus" />
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <style type="text/css">
 /* <![CDATA[ */
 .abstand
 {
line-height:35px;
 }
 /* ]]> */
 </style>
</head>
<body>
<ul style="list-style-type:none;">
<li class='abstand'><a href="xxx"><span class="datum">14.4.2007</span> <span class="text">Text1Text1Text1Text1</span></a></li>
<li class='abstand'><a href="yyy"><span class="datum">27.3.2007</span> <span class="text">Text2Text2Text2Text2</a></span></li>
</ul>

</body>
</html>


oder so
CODE

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
 <title></title>
 <meta name="GENERATOR" content="Quanta Plus" />
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <style type="text/css">
 /* <![CDATA[ */
#abstand
{
line-height:45px;
}
 /* ]]> */
 </style>
</head>
<body>
<ul id='abstand'>
  <li> sadfasf </li>
  <li>  asdfasf</li>
  <li> fdsasfd </li>
</ul>

</body>
</html>

gruss
Antoine


PS: Das Zauberwort heisst 'line-height:Anzahl px'


--------------------
Top
PMEmail PosterUsers Website
Top
 
Webi
#4 Geschrieben am: So 15.04.2007, 16:22 (+00:54)
Report PostQuote Post

AyomRank 6
************

Gruppe: Member (aktiv)
Beiträge: 646
Mitglied seit: 28.03.2004


Danke euch. Hat geklappt.

Gruss
Roland


--------------------
Top
PMEmail Poster
Top
 
Thema wird von 0 Benutzer(n) gelesen (0 Gäste und 0 anonyme Benutzer)
0 Mitglieder:
Trackback-Url: http://www.ayom.com/track/t/17859

Topic Options Reply to this topicStart new topicStart Poll

 


> Ähnliche Themen
[PHP] Text vernünftig formatieren TTlong 142 2 Di 10.06.2008, 20:37
SQL LIKE über Listen? Ronald Nickel 375 17 Mi 26.03.2008, 17:07
Abstand zwischen LI's im IE spaceman007 268 1 Fr 18.01.2008, 13:26
Prüfen ob Element ein Array ist pl_90 506 2 Mo 24.12.2007, 12:37
Abstand ist in Firfeox anders als in IE webdoktor 156 1 So 9.12.2007, 22:07
Selectboxen formatieren ... Ronald Nickel 175 5 Sa 24.11.2007, 23:00
Bilder ohne Abstand G.P. 350 6 Di 25.09.2007, 13:57
daten aus datenbank formatieren Klegs 274 8 Do 13.09.2007, 18:29
Formatieren anysom 471 9 Sa 11.08.2007, 16:16
Abstand zweier Bildpunkte zur Kollisionserkkenung ThePosterity 466 3 Sa 14.04.2007, 12:17




Anzeige - [Interessiert an einer Anzeige?]



Anzeigen


[Interessiert an einer Anzeige?]