2013-06-17 3 views
0

그 이상한 모든 방법을 제외하고 내 모든 CSS는 내가 그 중 하나에 뭔가를 적용하려고 할 경우 div id 11_tile 또는 12 거기에 내 Css에 이런 일이 일어나지 않도록 방지 할 수있는 라인이있을 수 있습니까? 목격자 CSS 스타일 , 특정 div의 여기CSS - 일부 CSS 속성이 작동하고 다른 항목이 div에 영향을주지 않습니까?

내 증거가에 적용하지 http://jsfiddle.net/rh6UD/

body 
{ 
    background-color: blue; 


    overflow: auto; 
    /*-webkit-user-select:none;*/ 

    white-space:nowrap; 

} 

#wrapper { 
    position:absolute; 
    top:50px; bottom:50px; left:0; 
    width:100%; 
    background:green; 
    overflow:auto; 
} 

#leftarea 
{ 
    background-color: skyblue; 
    width: 720px; 
    display: inline-block; 
    vertical-align: top; 


} 
#rightarea 
{ 
    background-color: white; 
    width: 2000px; 
    display: inline-block; 
    height: 580px; 
} 
#mainwindow 
{ 
    margin-top: 15px; 
    max-height: 600px; 
    background-color:black; 
    height: 600px; 
    width: 3000px; 
    padding: 5px 5px 5px 5px; 



} 
#search_tile 
{ 
    background-color: yellow; 
    height: 50px; 
    width: 350px; 
    display: inline-block; 
} 
#timeline_tile 
{ 
    margin: 5px; 
    position:relative; 
    width: 250px; 

    height: 580px; 
    background-color: white; 
    display: inline-block; 

} 
#conversations_tile 
{ 

    top: 5px; 
    vertical-align: top; 
    position:relative; 
    width: 250px; 
    height: 375px; 
    background-color: gray; 
    display: inline-block; 
} 
#source_tile 
{ 
    vertical-align: bottom; 
    background-color: yellow; 
    width: 450px; 
    height: 200px; 
    display: inline-block; 
    position:relative; 
    left: -255px; 
} 





#11_tile 
{ 


    background-color: yellow; 
    width: 450px; 
    height: 200px; 
    display: inline-block; 





} 



<div id="wrapper" class="wrapper"> 


    <div> <!-- TOP PART --> 


     <div id="search_tile" class="search_tile">search</div> 


    </div> <!-- TOP PART --> 

    <div id="mainwindow">     <!-- main window wrapper --> 

     <div id="leftarea" class="leftarea">  <!-- LEFT AREA --> 


      <div id="timeline_tile" class="timeline_tile">asdfasdfadsf 
       <input type="text" name="lala"></div> 
      <div id="conversations_tile" class="conversations_tile">asdfasdf</div> 
      <div id="source_tile" class="source_tile">asdfasd</div> 

     </div>  <!-- END LEFT AREA --> 

     <div id="rightarea" class="rightarea"> <!-- RIGHT FIRST AREA --> 

      <div id="11_tile" class="11_tile">1/1 full tile</div> 
      <div id="14_tile" class="14_tile">1/4</div> 
      <div id="12_tile" class="12_tile">1/2</div> 
      <div id="13_tile" class="13_tile">1/3</div> 
      <div id="23_tile" class="23_tile">2/3</div> 
      <div id="34_tile" class="34_tile">3/4</div> 

     </div> <!-- END RIGHT FIRST AREA --> 


    </div> <!-- END MAIN WINDOW --> 


</div> 

답변

4
이름을 변경, (적어도 파이어 폭스에서 작동하지 않습니다) 숫자로 시작할 수 없습니다

ID 이름 : 그것을 #의 tile_11하고, 작동합니다. http://jsfiddle.net/rh6UD/1/

#tile_11 
{ 


    background-color: yellow; 
    width: 450px; 
    height: 200px; 
    display: inline-block; 




} 
0

ID 년대는 숫자로 시작할 수 없습니다. 다른 ID 이름으로 변경하십시오.

예 : #tile11.

ID이 숫자로 시작되면 CSS는 요소에 영향을주지 않습니다.

관련 문제