2015-07-20 71 views
0

我想讓我的第一個網站,但我似乎無法創建我想象中在我腦海中。 我無法讓我的#invokeryolo div顯示出來。我完全沒有意識到,對於我的生活,我無法弄清楚什麼是錯的。這裏是我的代碼:Div不會顯示

HTML

<!DOCTYPE html> 
<html> 
<head> 
    <link rel="stylesheet" type="text/css" href="dotoker1.css" /> 
    <title>Comprehensive guide to Invoker</title> 
</head> 
<body> 
    <div id"invokeryolo"></div> 
    <div id='contenttable'> 
    <ol> 
     <li><a href="#overview">Guide overview and hero introduction</a></li> 
     <li><a href="#proscons">Pros and Cons</a></li> 
     <li><a href="#spells">Spells</a></li> 
     <li><a href="#earlymidlate">Early, mid and late game</a></li> 
     <li><a href="#buildorder">Build order and situational items</a></li> 
     <li><a href="#counter">Countering your counters</a></li> 
    </ol> 
    </div> 
    <div class="content" id="overview"></div> 
    <div class="content" id="proscons"></div> 
    <div class="content" id="spells"></div> 
    <div class="content" id="earlymidlate"></div> 
    <div class="content" id="buildorder"></div> 
    <div class="content" id="counter"></div> 
</body> 
</html> 

CSS

html, body { 
    background: url(http://dota2walls.com/wp-content/uploads/2014/11/invoker-arsenal-magus-wallpaper.png) no-repeat fixed; 
    height: 100%; 
} 

#invokeryolo { 
    background: url(http://image.blingee.com/images19/content/output/000/000/000/7df/820025845_2071037.gif); 
    width: 60%; 
    height: 200px; 
    position:absolute; 
    display: inline-block; 
    border: 1px solid black; 
} 

#contenttable { 
    width: 22%; 
    height: 300px; 
    display: inline-block; 
} 

ol { 
    display:block; 
    font-style: italic; 
    color: #CCCC88; 
    font-size: 130%; 
    margin-right: 20px; 
    background: rgba(0, 0, 0, 0.2); 
    } 

li { 
    margin-bottom: 5px; 
    background: rgba(0, 0, 0, 0.2); 
    } 

a { 
    color: #CCCC88; 
} 

a:visited { 
    color: #CCCC88; 
} 

.content { 
    background: rgba(0, 0, 0, 0.2); 
    width: 60%; 
    height: 20%; 
    margin-left: 23%; 
    display: inline-block; 
} 

所有的建議表示讚賞。提前致謝!

+0

請張貼您的CSS。 –

+0

@Pyere CSS已經在給定的代碼中,向下滾動。 –

+0

@decata對不起我的壞... –

回答

6

更改此:

<div id"invokeryolo"></div> 

這樣:

<div id = "invokeryolo"></div> 

你錯過了=跡象。

+0

哦,我的上帝,我現在感到非常羞愧--_-。謝謝一堆! –

+0

簡單但有效。 –