2011-09-19 72 views
-4

嘿我正在開發這個佈局爲我的未來網站,但我不能修改ID =滴定,因爲我已經添加了一個帶轉動轉換的容器div .....這裏是代碼Css問題與div

<style type="text/css"> 
body { 
    background-color: white; 
} 

.rotate { 

/* Rotate div */ 
transform:rotate(-90deg); 
-ms-transform:rotate(-90deg); /* IE 9 */ 
-moz-transform:rotate(-90deg); /* Firefox */ 
-webkit-transform:rotate(-90deg); /* Safari and Chrome */ 
-o-transform:rotate(-90deg); /* Opera */ 
background-color: transparent; 
position: fixed; 

margin-left: 1100px; 

} 
#titre { 
     font-family: baskerville; 
     color: blue; 
     text-transform: uppercase; 
     font-style: italic bold; 
} 
#description { 
      font-family: baskerville; 
      font-style: italic 
      text-transform: underline; 
      color: #000; 
      } 



</style> 
    <div class="rotate">      <!--Bloc devant aller à droite --> 
    <div id="titre">         
    <h1>{Title}</h1>       
    </div>  
    <div id=description">       
    {block:Description} 
     <p id="description">{Description}</p> 
    {/block:Description} 
    </div> 
    </div> 

你能看到我的問題在哪裏嗎?

+1

你不能有一個分區*和*一個ID爲'description'的段落,並且你在分區中缺少一個雙引號。 – animuson

+1

Argh。還有一段代碼不止一次地使用相同的ID。他們什麼時候會學習。 – Bojangles

回答

2

html元素中的ID應該是唯一的。

您有2個元素,id = description。

用途:

class="description" 

代替。 (如果您想將樣式應用於多個元素)

0

對同一頁上的兩個不同元素使用相同的ID是一個很大的禁忌。

給他們唯一的ID並給他們一個共同的匹配類。

class="description"