Horizontale Liste floaten

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Horizontale Liste floaten

    Abend,
    ich möchte eine horizontale Liste am linken und ein Bild am rechten Rand eines Divs haben, jedoch bekomme ich das Bild nicht in "die gleiche Zeile".
    PHP Code:
    <html>
        <
    head>
            <
    style type="text/css">
                
    div#nav_top_container {
                    
    background-color#000;
                    
    font-sizesmall;
                    
    padding2px 20px 2px 20px;
                }
                
    div#nav_top_container img {
                    
    bordernone;
                    
    border1px solid #c00;
                                    
    floatright;
                }
                
    div#nav_top_container ul {
                    
    margin0;
                    
    padding0;
                    
    border1px solid #c00;
                    
                
    }
                
    div#nav_top_container  li {                
                    
    displayinline;            
                }
                
    div#nav_top_container a {
                    
    background-imageurl(img/feil_grau.gif);
                    
    background-repeatno-repeat;
                    
    background-positionleft;
                    
    padding20px 10px;
                    
    color#fff;
                    
    text-decorationnone;
                    
    font-size12px;
                }
                
    div#nav_top_container a:hover {
                    
    background-imageurl(img/feil_blau.gif);
                }

            </
    style
            
    </head>
        <
    body>
            <
    div id="nav_top_container">
                <
    ul>
                    <
    li><a href="#">Startseite</a></li>
                    <
    li><a href="#">Kontakt</a></li>
                    <
    li><a href="#">Impressum</a></li>
                    <
    li><a href="#">Sitemap</a></li>
                    <
    li><a href="#">Login</a></li>
                </
    ul>
                <
    img src="img/cc.gif">
            </
    div>    
        </
    body>
    </
    html
    Ich habe bislang dem image float: right und der liste (ul) float:left gegeben, jedoch wird dann das Bild vertikal versetzt (ausserhalb des Divs) angezeigt. Irgendwelche Ideen?

    EDIT:
    So sieht es jetzt aus - das Bild (creative commons) soll quasi "hoch" (sorry wegen der Breite)

    Last edited by miguel_rkc; 09-08-2005, 19:45.

  • #2
    das Element, welches rechts gefloatet wird, vor dem links gefloateten im Quelltext notieren

    [code
    <img src= ... style="float:right">
    <ul>
    ...

    </ul>
    [/code]
    TBT

    Die zwei wichtigsten Regeln für eine berufliche Karriere:
    1. Verrate niemals alles was du weißt!


    PHP 2 AllPatrizier II Browsergame

    Comment


    • #3
      verdammt - danke!

      Comment

      Working...
      X