2012-04-16 3 views
-2

이것은CSS 하단 경계가 제대로 작동하지 않습니까? (? 질문에 어떤 요소 국경 - 해당 요소에 적용 만 CSS 클래스)

<html> 
    <head> 

     <link rel="stylesheet" type="text/css" href="css/Home.css" /> 
     <title>Customer</title> 
    </head> 
     <body> 
      <form id="formId" jwcid="[email protected]" success="ognl:listeners.addCustomer"> 

       <table> 
         <h3 id="customerTab1">Customer Data</h3> 
         <!--TextField for taking customerId--> 

         <!--TextField for taking customerName--> 
         <tr> 
          <td><label id="customerlabel1">Customer Name:</label> 
          <input type="text" jwcid="@TextField" id="customername" value="ognl:customerName"/></td> 
         </tr> 
         <!--TextField for taking customerAddress--> 
         <tr> 
          <td><label id="customerlabel2">Customer Address:</label> 
           <textarea rows="2" cols="20" jwcid="@TextArea" id="address" value="ognl:address"></textarea> 
          </td> 
         </tr> 
        </table> 
         <h3 id="customerTab2" >Select Gender</h3> 
         <!--RadioGroup with Radio buttons to select Gender--> 

          <span id="customerGender" jwcid="[email protected]" selected="ognl:customerGender"> 
           <Input type="radio" name="customerGender" jwcid="@Radio" value="0"/><label id="customermale">Male</label> 
           <Input type="radio" name="customerGender" jwcid="@Radio" value="1" /><label id="customerfemale">Female</label> 
          </span> 


         <h3 id="customerTab3" >Select Service</h3> 
          <!--Checkbox to select Service--> 
         <Input type="checkbox" id="customerPrivilege" jwcid="[email protected]" value="1" selected="ognl:customerPrivilege"/> 
         <label id="privilegecustomer">Privileged Customer</label> 
         <!--List to select PaymnetMode--> 
         <h3 id="customerTab4">Customer List</h3> 


          <select> 
           <span jwcid="@For" source='ognl:customerList' value='ognl:currentCustomerData' keyExpression="id"> 
            <option jwcid="@Any" value='ognl:currentCustomerData.id'><span jwcid="@Insert" value='ognl:currentCustomerData.customerName'></span></option> 
           </span> 
          </select> 
          <!--Buttons to perform desired action--> 
          <input id="submitform" type="Submit" value="Add Customer" /> 

      </form>  

     </body> 
</html> 

2. CSS code 


html, body, div, span, applet, object, iframe, 
h1, h2, h3, h4, h5, h6, p, blockquote, pre, 
a, abbr, acronym, address, big, cite, code, 
del, dfn, em, img, ins, kbd, q, s, samp, 
small, strike, strong, sub, sup, tt, var, 
b, u, i, center, 
dl, dt, dd, ol, ul, li, 
fieldset, form, label, legend, 
table, caption, tbody, tfoot, thead, tr, th, td, 
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary, 
time, mark, audio, video { 
    margin: 0; 
    padding: 0; 
    border: 0; 
    font-size: 100%; 
    font: inherit; 
    vertical-align: baseline; 
} 
/* HTML5 display-role reset for older browsers */ 
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section { 
    display: block; 
} 
body { 
    line-height: 1; 
} 
ol, ul { 
    list-style: none; 
} 
blockquote, q { 
    quotes: none; 
} 
blockquote:before, blockquote:after, 
q:before, q:after { 
    content: ''; 
    content: none; 
} 
table { 
    border-collapse: collapse; 
    border-spacing: 0; 
} 
body 
{ 
    margin: 17% 25%; 

    border-width: 1em; 

    border-style: groove; 
    border-color: orange; 

    background-image:url('blue.BMP'); 

    background-repeat:no-repeat; 
    background-position:50%; 

    background-size:100%; 

} 
textarea { 
    position: absolute; 
    left: 48.2%; 
    height: 5%; 

    resize: none; 
    width:12%; 
    top: 34%; 
} 
#customerlabel1 
{ 
    position: absolute; 
    left: 34%; 
    top: 30%; 
    font-family:verdana; 
    font-weight:bold; 
} 
#customerlabel2 
{ 
    position: absolute; 
    left: 34%; 
    top: 34%; 
    font-family:verdana; 
    font-weight:bold; 
} 
#customername { 
    position: absolute; 
    left: 48%; 
    top: 29.5%; 
} 
#customerGender 
{ 
    position: absolute; 
    left: 42%; 
    top: 47%; 
} 
#customermale 
{ 

    font-family:verdana; 
    font-weight:bold; 

} 
#customerfemale 
{ 

    font-family:verdana; 
    font-weight:bold; 

} 
#customerPrivilege 
{ 
    position: absolute; 
    left:40%; 
    top: 57%; 

} 
#privilegecustomer 
{ 
    position: absolute; 
    left: 42%; 
    top: 57%; 
    font-family:verdana; 
    font-weight:bold; 
} 
#customerTab1 { 
    position: absolute; 
    left: 42%; 
    top: 26%; 
    background-color:fuchsia ; 
    background-repeat: no-repeat; 
    color: black; 
    text-align: left; 
    font-family: Arial; 
    font-style: normal; 
    font-weight: 500; 
    font-size: 1.5em; 
} 
#customerTab2 { 
    position: absolute; 
    left: 42%; 
    top: 42%; 
    background-color: fuchsia; 
    background-repeat: repeat-x; 
    color: black; 
    text-align: left; 
    font-family: Arial; 
    font-style: normal; 
    font-weight: 500; 
    font-size: 1.5em; 
} 
#customerTab3 { 
    position: absolute; 
    left: 42%; 
    top: 52%; 
    background-color: fuchsia; 
    background-repeat: repeat-x; 
    color: black; 
    text-align: left; 
    font-family: Arial; 
    font-style: normal; 
    font-weight: 500; 
    font-size: 1.5em; 
} 
#customerTab4 { 
    position: absolute; 
    top: 62%; 
    left: 42%; 
    background-color: fuchsia; 
    background-repeat: repeat-x; 
    color: black; 
    text-align: left; 
    font-family: Arial; 
    font-style: normal; 
    font-weight: 500; 
    font-size: 1.5em; 


} 
select { 
    position: absolute; 
    left: 44%; 
    top: 66%; 
    font-family:verdana; 
    font-weight:bold; 
} 
#submitform 
{ 
    position: absolute ; 
    left: 44%; 
    top: 70%; 

} 
+0

누군가 pls가 대답합니다. 파이어 폭스와 IE 8을 제외한 모든 브라우저에서 작동합니다. – surajR

+1

http://sscce.org/이 제공되어야합니다. – fcalderan

+1

국경 바닥을 전혀 설정하지 않고 모든 방향으로 경계를 설정합니다. 테두리를 표시 할 방법과 방법을 지정하지 않았습니다. 이 코드는 문제를 설명하기 위해 작성된 작업 페이지 또는 최소 문서가 아닙니다. –

답변

0

귀하의 질문은 불분명 일부 고객의 정보를 저장 내 html 파일이지만, 일반적으로, 일부 브라우저 객체가 비어있는 경우 표시 가능한 내용이 없습니다.

<td> 
</td> 

그것은 귀하의 질문에 매우 분명하지 않다

<td>&nbsp;</td> 
+0

빈칸이 없으므로 코드를 신중하게 읽으십시오 ... 컴퓨터에서 사용해보십시오. 모든 브라우저에서 작동하지만 firefox 및 IE에서는 작동하지 않습니다. – surajR

+0

@surajR IE9가 설치되어 있으면 F12를 눌러 CSS를 볼 수 있습니다 해당 개체를 클릭하여 해당 개체를 클릭하면 모든 상속 된 CSS 코드가 표시됩니다. 또한 값을 해제하여 변경 방법을 확인할 수 있습니다. – Ozzy

+0

iE9를 지원하지 않는 Windows XP에서 작업하고 있습니다. 따라서 안정적인 대안을 알려줍니다. – surajR

1

될 것입니다,하지만 난 추측하고있어 :

이 해결하기 위해, 예를 들어, 빈 객체에 "공간"을 넣어 귀하의 문제는 국경이 제대로 귀하의 html로 body 포장되지 않습니다. 이것은 안에 form 안에있는 모든 요소를 ​​절대적으로 배치하기 때문에 발생합니다. 모든 요소가 절대적으로 배치 되었기 때문에 실제적으로 바디의 레이아웃 안에 요소가 없기 때문에 브라우저는 몸체의 높이를 0으로 지정합니다.

폼 요소의 절대 위치 지정을 피하기 위해 CSS를 다시 작성하는 것이 좋습니다. .

+0

시체를 절대 위치로두면 어떨까요? – surajR

+0

@surajR 별 차이가 없다. –