html - How to remove spaces between two tds in a single table -
i working in html table have multiple tds there problem want reduce space between tds ,using css how that? here code
<table id="employementinfo"> <tr> <th colspan="3" id="currentemploymentheading"> current employment </th> </tr> <tr> <th class="empleftdiv">current employment status<span style='color: #ff0000; display: inline;'>*</span></th> <% if(employmentstatus.equals("employeed")) {%> <td class="emprightdiv"> <input type="radio" name="employementstatus" value="<%=employmentstatus %>" checked>employeed <input type="radio" name="employementstatus" value="not employeed">not employeed<br> </td> <%}else if(employmentstatus.equals("not employeed")){%> <td class="emprightdiv"> <input type="radio" name="employementstatus" value="employeed">employeed <input type="radio" name="employementstatus" value="<%=employmentstatus %>" checked>not employeed<br> </td> <%} else {%> <td class="emprightdiv"> <input type="radio" name="employementstatus" value="employeed">employeed <input type="radio" name="employementstatus" value="not employeed">not employeed<br> </td> <%} %> </tr> <tr> <th>current title<span style='color: #ff0000; display: inline;'>*</span></th> <td class="emprightdiv"><aui:input inlinefield="true" label="" name="currentjobtitle" size="45" id="currentjobtitle" value="<%=currentjobtitle %>"/></td> </tr> <tr> <th>current employer<span style='color: #ff0000; display: inline;'>*</span></th> <td class="emprightdiv"><aui:input inlinefield="true" label="" name="currentemployer" size="45" id="currentemployer" value="<%=currentemployer %>"/></td> </tr> <tr> <th>preference next opportunity</th> <% if(nextoppurtunitypreferred.equals("full time")) {%> <td class="emprightdiv"> <input type="radio" name="nextoppurtunitypreferred" value="<%=nextoppurtunitypreferred %>" checked>full time <input type="radio" name="nextoppurtunitypreferred" value="<%=nextoppurtunitypreferred %>">contract roles </td> <%}else if(employmentstatus.equals("contract roles")){%> <td class="emprightdiv"> <input type="radio" name="nextoppurtunitypreferred" value="<%=nextoppurtunitypreferred %>">full time <input type="radio" name="nextoppurtunitypreferred" value="<%=nextoppurtunitypreferred %>" checked>contract roles </td> <%}else {%> <td class="emprightdiv"> <input type="radio" name="nextoppurtunitypreferred" value="full time">full time <input type="radio" name="nextoppurtunitypreferred" value="contract roles">contract roles </td> <%} %> </tr> <tr> <th>what single biggest motivator in potential new opportunity?</th> <td> <select id="motivator" name="motivator" multiple="multiple"> <% while(rs8.next()){ motivatorstring = rs8.getstring("motivators"); %> <option value ="<%=motivatorstring %>" ><%=motivatorstring %> </option> <%} %> </select> </td> </tr> <tr> <th>how many minutes willing commute work?<span style='color: #ff0000; display: inline;'>*</span></th> <% if(worklocationreachingtime.equals("15-30")) {%> <td> <input type="radio" name="worklocationreachingtime" value="<%=worklocationreachingtime %>" checked>15-30 <input type="radio" name="worklocationreachingtime" value="30-60">30-60<br> <input type="radio" name="worklocationreachingtime" value="60-90" >60-90 <input type="radio" name="worklocationreachingtime" value="90-120" >90-120<br> </td> <%}else if(worklocationreachingtime.equals("30-60")){%> <td> <input type="radio" name="worklocationreachingtime" value="15-30" checked>10-30 <input type="radio" name="worklocationreachingtime" value="<%=worklocationreachingtime %>" checked>30-60<br> <input type="radio" name="worklocationreachingtime" value="60-90" >60-90 <input type="radio" name="worklocationreachingtime" value="90-120" >90-120<br> </td> <%}else if(worklocationreachingtime.equals("60-90")){%> <td> <input type="radio" name="worklocationreachingtime" value="15-30" checked>10-30 <input type="radio" name="worklocationreachingtime" value="30-60">30-60<br> <input type="radio" name="worklocationreachingtime" value="60-90">60-90 <input type="radio" name="worklocationreachingtime" value="<%=worklocationreachingtime %>" checked>90-120<br> </td> <%} else if(worklocationreachingtime.equals("90-120")){%> <td> <input type="radio" name="worklocationreachingtime" value="15-30" checked>10-30 <input type="radio" name="worklocationreachingtime" value="30-60">30-60<br> <input type="radio" name="worklocationreachingtime" value="60-90" >60-90 <input type="radio" name="worklocationreachingtime" value="<%=worklocationreachingtime %>" checked>90-120<br> </td> <%} else {%> <td> <input type="radio" name="worklocationreachingtime" value="15-30" >15-30 <input type="radio" name="worklocationreachingtime" value="30-60" >30-60<br> <input type="radio" name="worklocationreachingtime" value="60-90" >60-90 <input type="radio" name="worklocationreachingtime" value="90-120" >90-120<br> </td> <%} %> </tr> <tr> <th>are there areas outside current location open considering new work opportunities in? if please list below</th> <td><aui:input inlinefield="true" label="" id="candidatelocationpreference" name="candidatelocationpreference" size="45" value="<%=candidatelocationpreference %>"/></td> </tr> <tr> <th colspan="3" id="currentemploymentheading"> annual compensation details </th> </tr> <tr> <th>select currency:</th> <td> <select id="currency" name="currency"> <% while (rs9.next()) { string currencyvalue = rs9.getstring("currencyvalue"); string currencyname = rs9.getstring("currencyname"); if(candidatecurrency.equals(currencyvalue)){ //system.out.println("from db:"+candidatecurrency+" , current:"+currencyvalue); %> <option value="<%=currencyvalue%>" selected><%=currencyname%></option> <% }else{ %> <option value="<%=currencyvalue%>"><%=currencyname%></option> <% } } %> </select> </td> </tr> <tr> <th>current base<span style='color: #ff0000; display: inline;'>*</span></th> <td class="empleftdiv"><span class="currencysymbol"><b>$</b></span><aui:input inlinefield="true" label="" name="currentbase" id="currentbase" size="45" value="<%=currentbase %>"/><span id="errmsg4"></span></td> <td class="emprightdiv"><b>$</b><aui:input inlinefield="true" label="" name="currentbaseinusd" id="currentbaseinusd" size="45" value="<%=currentbaseusd %>" readonly="readonly"/></td> </tr> <tr> <th>bonus potential<span style='color: #ff0000; display: inline;'>*</span></th> <td><span class="currencysymbol"><b>$</b></span><aui:input inlinefield="true" label="" name="bonuspotential" id="bonuspotential" size="45" value="<%=bonuspotential %>"/><span id="errmsg5"></span></td> <td class="emprightdiv"><b>$</b><aui:input inlinefield="true" label="" name="bonuspotentialinusd" id="bonuspotentialinusd" size="45" value="<%=bonuspotentialusd %>" readonly="readonly"/></td> </tr> <tr> <th>benefits</th> <td><span class="currencysymbol"><b>$</b></span><aui:input inlinefield="true" label="" name="benefits" id="benefits" size="45" value="<%=benefits %>"/><span id="errmsg6"></span></td> <td class="emprightdiv"><b>$</b><aui:input inlinefield="true" label="" name="benefitsinusd" id="benefitsinusd" size="45" value="<%=benefitsusd %>" readonly="readonly"/></td> </tr> <tr> <th>car allowance</th> <td><span class="currencysymbol"><b>$</b></span><aui:input inlinefield="true" label="" name="carallowance" id="carallowance" size="45" value="<%=carallowance %>"/><span id="errmsg8"></span></td> <td class="emprightdiv"><b>$</b><aui:input inlinefield="true" label="" name="carallowanceinusd" id="carallowanceinusd" size="45" value="<%=carallowanceusd %>" readonly="readonly"/></td> </tr> <tr> <th>annual stock (cash value)</th> <td><span class="currencysymbol"><b>$</b></span><aui:input inlinefield="true" label="" name="stock" id="stock" size="45" value="<%=stock %>"/><span id="errmsg9"></span></td> <td class="emprightdiv"><b>$</b><aui:input inlinefield="true" label="" name="stockinusd" id="stockinusd" size="45" value="<%=stockusd %>" readonly="readonly"/></td> </tr> <tr> <th>total current compensation<span style='color: #ff0000; display: inline;'>*</span></th> <td><span class="currencysymbol"><b>$</b></span><aui:input inlinefield="true" label="" name="totalcompensation" id="totalcompensation" size="45" value="<%=totalcompensation %>" readonly="readonly"/><span id="errmsg10"></span></td> <td class="emprightdiv"><b>$</b><aui:input inlinefield="true" label="" name="totalcompensationinusd" id="totalcompensationinusd" size="45" value="<%=totalcompensationusd %>" readonly="readonly"/></td> </tr> <tr> <th>total compensation expectation<span style='color: #ff0000; display: inline;'>*</span></th> <td><span class="currencysymbol"><b>$</b></span><aui:input inlinefield="true" label="" name="totalexpected" id="totalexpected" size="45" value="<%=totalexpected %>"/><span id="errmsg11"></span></td> <td class="emprightdiv"><b>$</b><aui:input inlinefield="true" label="" name="totalexpectedinusd" id="totalexpectedinusd" size="45" value="<%=totalexpectedusd %>" readonly="readonly"/></td> </tr> <tr> <th>vacation (in days)</th> <td><aui:input inlinefield="true" label="" name="vacation" id="vacation" size="45" value="<%=vacation %>"/><span id="errmsg7"></span></td> </tr> <br> <table width="9%"> <tr> <td align="center"> <aui:button type="submit" name="submit" value="save" style="width: 160px height:49px;" onclick="employeementdetails();"></aui:button> </td> <td align="center"> <aui:button type="submit" name="submit" value="close" style="width: 160px height:49px;" onclick="hideemployeement();"></aui:button> </td> </tr> </table>
i trying use css class
#employementinfo{ border-collapse: collapse; } .emprightdiv{ width: 20%; padding:0px; margin:0px; }
but not working ,somebody please .
try css.
<style> table{ border-collapse: collapse; } table tr td{ padding:0px; margin:0px; border:0px; } </style>
or if want use class. try use margin , padding attribute.
#employementinfo{ border-collapse: collapse; } .emprightdiv{ width: 20%; padding:0px; margin:0px; }
Comments
Post a Comment