I am creating a table. I want to remove table border line, how do I this?
Here is my code:
<div id="table">
<table class="table table-bordered">
<thead>
<tr>
<th style="text-align:left; width:120px;">Item</th>
<th style="text-align:left; width:200px;">Description</th>
<th style="width:100px;">Unit Cost</th>
<th style="text-align:right; width:60px;">Qty</th>
<th style="text-align:left; width:100px;">Tax</th>
<th style="text-align:left; width:100px;">Tax</th>
<th style="text-align:left; width:100px;">Line Total</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan=7 width=800>
<div id="dataRows">
<div class="fieldRow" id="template">
<select class="items" name="items" style="width:127px; float:left;" id="items"> <option value="1" selected="selected" disabled="disabled"></option></select>
<textarea name="description" id="description" class="description" style="float:left; display: block; height: 30px; width:211px; border-radius:0px; margin: -1px 0px 0;"></textarea>
<input type="text" name="unitprice" id="unitprice" class="unitprice" style="float:left; display: block; height: 30px; width:106px; border-radius:0px; margin: -1px 0px 0;">
<input type="text" name="quantity" id="quantity" class="quantity" style="float:left; display: block; height: 30px; width:64px; border-radius:0px; margin: -1px 0px 0;">
<select name="firsttax" id="firsttax" class="firsttax" style=" float:left; display: block; height: 31px; width:107px; border-radius:0px; margin: -2px 0px 0;"><option value="1" selected="selected" ></option></select>
<select name="secondtax" id="secondtax" class="secondtax" style="float:left; display: block; height: 31px; width:104px; border-radius:0px; margin: -2px 0px 0;"><option value="1" selected="selected"></option></select>
<input type="text" name="linetotal" id="linetotal" class="linetotal" placeholder="0.00" readonly style="float:left; display: block; height: 31px; width:104px; border-radius:0px; background-color: #F0F0F0; text-align:right; margin: -2px 0px 0;">
<input type="button" class="button remove" id="btnDel" value="Remove Row" style="float:right; margin:0 -110px; color: #ffffff; background-color: #d9534f; border-color: #d43f3a; padding: 3px 10px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.428571429; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; border:1px solid transparent; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;" />
</div>
</div>
</td>
</tr>
<input type="hidden" id="itemscounter" name="itemscounter" value=""/>
<tr>
<td colspan=7 rowspan=2 width=800 style="border:0px solid white;">
<div style="border:1px solid #DDDDDD; width:317px; height:50px; margin:0 -1px; float:right;">
<label class="required" id="invoicetotal" for="Invoicetotal" style="padding-top:3px;">Invoice Total(USD)</label>
<span style=" font-weight:bold; margin:4px -204px 0; float:right;">$</span>
<input type="text" class="required" id="invoicetotalamount" name="invoicetotalamount" placeholder="0.00" readonly style=" color:#526273; font-weight:bold; text-align:left; border: 0px solid #000000;"/><br>
<label class="required" id="paidtodate" for="paidtodate" style="margin-top: -6px;">Paid to date</label>
<input type="text" class="required" id="paidtodateamount" name="paidtodateamount" placeholder="0.00" style=" color:#526273; font-weight:bold; text-align:right; border: 0px solid #000000;"/>
</div>
<div class="clear"></div>
<div style="border:1px solid #DDDDDD; width:317px; height:33px; margin:50px -316px 0; float:right;">
<label class="required" id="balance" for="balance" style="margin-top:0px;">Balance(USD)</label>
<span style=" font-weight:bold; margin:7px 45px 0; float:left;">$</span>
<input type="text" class="required" id="balanceamount" name="balanceamount" placeholder="0.00" readonly style=" color:#526273; font-weight:bold; text-align:left; border: 0px solid #000000;"/>
</div>
</td>
</tr>
</tbody>
</table>
</div>
and here is my css:
#table{
float: left;
height: 200px;
margin: -291px 19px 0;
width: 825px;
}
and here is screenshot:
use css
it would be
table, th, td
{
border: 0;
}
table
{
border-collapse:collapse;
}
<table border="0" style="width:825px;"> </table>
put border value 0 in css or declare table border like these above i mentioned.. post ur full css code..
Try to use this code:
<table border="0" style="width:825px;border:0px;"> </table>
Try this simple CSS
table.myTable { border:none; }
edit your class and add/change border to zero or try changing into border tag in table.
Related
I am creating a form with table in Mailchimp Advanced mode. I can't divide the 2 columns 50% - 50%. I don't know why the left column takes more space than the right.
.formLabel {
vertical-align: top;
font-size: 14px;
color: #4d858d;
font-weight: bold;
text-align: left;
margin: 22px;
padding: 10 15 10 15;
width: auto;
}
.container {
background-color: #FFFFFF;
width: 700px;
border: none;
padding: 5 5 15 5;
margin-left: auto;
margin-right: auto;
}
ul,li {
margin: 0;
padding: 0;
list-style: none;
}
body {
background-color: #FFFFFF;
font-family: verdana;
font-size: 12px;
text-align: center;
min-width: 700px;
margin: 20 0 0 0;
}
input[type="text"] {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: #F5F5F5;
border-width: 0px;
border-style: solid;
width: 100%;
max-width: 100%;
font-size: 14px;
padding: 6 10 6 10;
box-sizing: border-box;
font-weight: normal;
box-shadow: 0 3px 0px rgba(0, 0, 0, 0.075);
}
.select-small {
width: 100%;
height: 27;
webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: #F5F5F5;
border-width: 0px;
border-style: solid;
width: 100%;
max-width: 100%;
box-shadow: 0 3px 0px rgba(0, 0, 0, 0.075);
}
<tr>
<td align="left" class="formLabel">Anrede <span class="req asterisk">*</span>
<br>
<div class="interestgroup_field radio-group" id="MERGE3">
<label class="radio" for="MERGE3-0">
<input type="radio" data-dojo-type="dijit/form/RadioButton" name="MERGE3" id="MERGE3-0" value="Herr" class="av-radio"><span>Herr</span></label>
<label class="radio" for="MERGE3-1">
<input type="radio" data-dojo-type="dijit/form/RadioButton" name="MERGE3" id="MERGE3-1" value="Herr" class="av-radio"><span>Frau</span></label>
<label class="radio" for="MERGE3-2">
<input type="radio" data-dojo-type="dijit/form/RadioButton" name="MERGE3" id="MERGE3-2" value="Dr" class="av-radio"><span>Dr</span></label>
</div>
<br>
<div class="error">*|HTML:MMERGE3ERROR|*</div>
</td>
</tr>
<tr>
<td align="left" class="formLabel">Vorname <span class="req asterisk">*</span>
<br>
<input type="text" name="MERGE1" id="MERGE1" size="35" value="*|MERGE1|*">
<br>
<div class="error">*|HTML:FNAMEERROR|*</div>
</td>
<td align="left" class="formLabel">Nachname <span class="req asterisk">*</span>
<br>
<input type="text" name="MERGE2" id="MERGE2" size="35" value="*|MERGE2|*">
<br>
<div class="error">*|HTML:LNAMEERROR|*</div>
</td>
</tr>
<tr>
<td align="left" class="formLabel">Position
<br>
<input type="text" name="MERGE5" id="MERGE5" value="*|MERGE5|*">
<br>
<div class="error">*|HTML:MMERGE5ERROR|*</div>
</td>
<td align="left" class="formLabel">Firma <span class="req asterisk">*</span>
<br>
<input type="text" name="MERGE6" id="MERGE6" value="*|MERGE6|*">
<br>
<div class="error">*|HTML:MMERGE6ERROR|*</div>
</td>
</tr>
There are two things wrong with this code
You are missing the code to start and end a table <table width="100%" border="0" cellspacing="0" cellpadding="0"> and </table>
Your HTML closes before the the style tags.
Fix those two things and your form takes shape.
<html>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" align="left" class="formLabel">Anrede <span class="req asterisk">*</span><br>
<div class="interestgroup_field radio-group" id="MERGE3"> <label class="radio" for="MERGE3-0"><input type="radio" data-dojo-type="dijit/form/RadioButton" name="MERGE3" id="MERGE3-0" value="Herr" class="av-radio"><span>Herr</span></label><label class="radio" for="MERGE3-1"><input type="radio" data-dojo-type="dijit/form/RadioButton" name="MERGE3" id="MERGE3-1" value="Herr" class="av-radio"><span>Frau</span></label><label class="radio" for="MERGE3-2"><input type="radio" data-dojo-type="dijit/form/RadioButton" name="MERGE3" id="MERGE3-2" value="Dr" class="av-radio"><span>Dr</span></label> </div>
<br><div class="error">*|HTML:MMERGE3ERROR|*</div>
</td>
</tr>
<tr>
<td align="left" class="formLabel">Vorname <span class="req asterisk">*</span><br>
<input type="text" name="MERGE1" id="MERGE1" size="35" value="*|MERGE1|*">
<br> <div class="error">*|HTML:FNAMEERROR|*</div>
</td>
<td align="left" class="formLabel">Nachname <span class="req asterisk">*</span><br>
<input type="text" name="MERGE2" id="MERGE2" size="35" value="*|MERGE2|*">
<br> <div class="error">*|HTML:LNAMEERROR|*</div>
</td>
</tr>
<tr>
<td align="left" class="formLabel">Position <br>
<input type="text" name="MERGE5" id="MERGE5" value="*|MERGE5|*">
<br> <div class="error">*|HTML:MMERGE5ERROR|*</div>
</td>
<td align="left" class="formLabel">Firma <span class="req asterisk">*</span><br>
<input type="text" name="MERGE6" id="MERGE6" value="*|MERGE6|*">
<br> <div class="error">*|HTML:MMERGE6ERROR|*</div>
</td>
</tr>
</tr>
</table>
<style> .formLabel {
vertical-align: top;
font-size: 14px;
color: #4d858d;
font-weight: bold;
text-align: left;
/*margin: 22px;
padding: 10 15 10 15;*/
width: auto;
border:1px solid #000000;
}
.container {
background-color: #FFFFFF;
width: 700px;
border: none;
/*padding: 5 5 15 5;*/
margin-left: auto;
margin-right: auto;
} ul,
li {
margin: 0;
padding: 0;
list-style: none;
} body {
background-color: #FFFFFF;
font-family:verdana;
font-size: 12px;
text-align: center;
min-width: 700px;
margin: 20 0 0 0;
} input[type="text"] {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: #F5F5F5;
border-width: 0px;
border-style: solid;
width: 100%;
max-width: 100%;
font-size: 14px;
padding: 6 10 6 10;
box-sizing: border-box;
font-weight: normal;
box-shadow: 0 3px 0px rgba(0, 0, 0, 0.075); }
.select-small {
width: 100%;
height: 27;
webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: #F5F5F5;
border-width: 0px;
border-style: solid;
width: 100%;
max-width: 100%;
box-shadow: 0 3px 0px rgba(0, 0, 0, 0.075); }
</style></html>
Let me know if this is what you were after.
I have been trying to design a table like
As you see in the snipped code, table rows are not next to each other. the table rows place itself under the above table row. What should I add or change to make them place next to each other like the one in the picture?
table.roomstable th {
border-left: 0 none !important;
background-color: #5a97ee;
padding: 6px 8px;
margin: 0;
color: #fff;
font-weight: bold;
font-size: small;
}
table.roomstable {
width: 100%;
}
table.roomstable tr {
}
table.roomstable th#price_highlight {
width: 76px;
min-width: 76px;
background: #00357f;
text-align: center;
}
th#price_highlight div.price-highlight-inner {
position: relative;
margin: 0;
padding: 0;
}
.roomArea th.canwrap {
white-space: normal;
}
.btnBooking-wrap .btn-acb {
width: 100%;
min-width: 110px;
color: #fff !important;
font-size: 13px !important;
}
.btnBooking-wrap .btn-acb {
border-collapse: collapse;
bottom: 0px;
box-shadow: rgb(170, 170, 170) 0px 0px 3px 0px;
color: rgb(255, 255, 255);
cursor: pointer;
height: 33px;
left: 0px;
min-height: 0px;
min-width: 110px;
position: relative;
right: 0px;
top: 0px;
vertical-align: middle;
width: 121px;
column-rule-color: rgb(255, 255, 255);
perspective-origin: 60.5px 16.5px;
transform-origin: 60.5px 16.5px;
background: rgb(8, 150, 255) none repeat scroll 0% 0% / auto padding-box border-box;
border: 2px solid rgb(255, 255, 255);
border-radius: 3px 3px 3px 3px;
font: normal normal bold normal 13px / 19.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
outline: rgb(255, 255, 255) none 0px;
padding: 5px 10px;
}
.btnBooking-wrap .btn-acb:hover {
background-color: #003580;
}
table.roomstable td.room-type-container {
border-right: 1px solid #5a97ee !important;
}
.bed-types-wrapper {
margin: 16px 8px;
line-height: 1.4;
}
.bed-types {
background: #e5ebfb;
padding: 5px 10px;
border-radius: 4px;
}
.bed-types label {
display: table;
font-size: 13px;
}
.bed-label {
font-weight: bold;
vertical-align: top;
}
.bed-type-select {
display: table-cell;
vertical-align: top;
padding-right: 5px;
}
.name-bed-types {
display: inline-block;
list-style-type: none;
padding: 0;
margin: 0;
}
.room-options {
margin-bottom: 13px;
font-size: 13px;
font-weight: lighter;
color: #390;
display: block;
margin-top: 3px;
}
.included-price-tax {
font-size: 13px;
text-align: left;
}
.room-options-wrapper span {
clear: left;
/*padding-left: 0!important;*/
padding-left: 4px!important;
}
table.roomstable td {
border-left: 1px solid #96b2d9;
padding: 6px;
}
.bb {
border-bottom: 1px solid #96b2d9;
}
<div id="rooms_table" style="margin: 0;">
<div id="available_rooms" style="margin-bottom: .5em;">
<form autocomplete="off" id="roomsFor" name="roomsFor" action="#" method="GET">
<div class="roomArea" id="maxHotelRoomArea">
<div id="individualRooms" class="rtshown">
<table class="roomstable roomstable-long-language">
<thead class style="width:814px; top:0px; z-index:auto">
<tr id="maxhotel_table_header">
<th class="canwrap" style="width:273px"> Accommodation Type</th>
<th class="occupancy-dropdown-header" style="width: 56px;">Max</th>
<th id="price_highlight" class="price-figure canwrap" style="width:76px;">
<div class="price-highlight-inner">
Price for 1 night
</div>
</th>
<th class="conditions" style="width:150px;">Your options</th>
<th id="number_rooms_header" class="canwrap" style="width:60px;">
Quantity
</th>
<th class="cyr-header canwrap" style="width:117px;">Confirm your reservation
</th>
</tr>
</thead>
<tbody id="room_availability_container">
<tr>
<td colspan="5" style="padding:0;"></td>
<td id="btnBooking" rowspan="400" style="min-width: 121px; background-color: rgb(255, 255, 255);">
<div class="btnBooking-wrap" style="display:block; width:121px; top:42px; padding-top:10px; z-index:auto">
<div id="booking_summary" style="display:none;">
DISPLAY BOOKING SUMMARY HERE
<span class="rooms-count">
<strong>1</strong> room selected
</span>
<span class="total-price">
BAM 60
</span>
<span class="breakfast-included">
Breakfast <strong>included</strong>
</span>
</div>
<button class="btn-acb">Reserve</button>
</div>
</td>
</tr>
<tr class="room-counter-1">
<td class="roomId room-type room-type-container">
<a name="roomId" style="display:block; position:relative; top:-50px;"></a>
<div class="room-type-room-info" id="roomId"></div>
<span style="display:block;">
Standard Double Room
<div class="bed-types bed-types-wrapper">
<label class="bed-label">Choose your bed:</label>
<!--alttaki 2 label oda isminin detaylari.-->
<label>
<div class="bed-type-select">
<input type="radio" id="bedPreference_roomId"
name="bedPreference_roomId"
data-dojo-type="dijit/form/RadioButton"/>
</div>
<ul class="name-bed-types">
<li class="bed-type">
1 single bed
<div class="riba-beds"
style="font-size: 24px;"></div>
</li>
</ul>
</label>
<label>
<div class="bed-type-select">
<input type="radio" id="_beddPreference_roomId"
name="beddPreference_roomId"
data-dojo-type="dijit/form/RadioButton"/>
</div>
<ul class="name-bed-types">
<li class="bed-type">
1 large double bed
<div class="riba-double-bed"
style="font-size: 24px;"></div>
</li>
</ul>
</label>
</div>
<span class="room-options">
<div class="room-options-wrapper">
<span><div style="zoom:0.7;" class="riba-bell"></div> name</span>
<span><div style="zoom:0.7;" class="riba-air-conditioner"></div> name</span>
<span><div style="zoom:0.7;" class="riba-departures"></div> name</span>
<span><div style="zoom:0.7;" class="riba-family"></div> name</span>
</div>
</span>
<div class="included-price-tax">
<strong class="included-label">Included:</strong> 17% VAT, 1BAM city tax per person per night.
</div>
</span>
</td>
<td colspan="4" style="padding:0;"></td>
</tr>
<tr class="room-counter-1" id="roomIdx">
<td class="room-max-person bb" id="roomMaxPerson">
2
</td>
<td class="room-price bb" id="roomPrice">
<span class="room-price-span">195BAM</span>
</td>
<td class="option-policy bb" id="optionPolicy">
<span>test</span>
<span>test2</span>
</td>
<td class="room-num-dropdown bb" id="roomNumDropdown">
<select>
<option value="1">1 (200BAM)</option>
<option value="2">2 (350BAM)</option>
</select>
</td>
</tr>
<tr class="room-counter-1" id="roomIdxx">
<td class="room-max-person bb" id="roomMaxPersonx">
2
</td>
<td class="room-price bb" id="roomPricex">
<span class="room-price-span">195BAM</span>
</td>
<td class="option-policy bb" id="optionPolicyx">
<span>test</span>
<span>test2</span>
</td>
<td class="room-num-dropdown bb" id="roomNumDropdownx">
<select>
<option value="1">1 (200BAM)</option>
<option value="2">2 (350BAM)</option>
</select>
</td>
</tr>
<tr class="room-counter-1" id="roomIdxxx">
<td class="room-max-person bb" id="roomMaxPersonxx">
2
</td>
<td class="room-price bb" id="roomPricexx">
<span class="room-price-span">195BAM</span>
</td>
<td class="option-policy bb" id="optionPolicyxx">
<span>test</span>
<span>test2</span>
</td>
<td class="room-num-dropdown bb" id="roomNumDropdownxx">
<select>
<option value="1">1 (200BAM)</option>
<option value="2">2 (350BAM)</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</div>
</div>
You should add a rowspan to the most left column <td rowspan="4" class="roomId room-type room-type-container">
Check the code snippet.
table.roomstable th {
border-left: 0 none !important;
background-color: #5a97ee;
padding: 6px 8px;
margin: 0;
color: #fff;
font-weight: bold;
font-size: small;
}
table.roomstable {
width: 100%;
}
table.roomstable tr {
}
table.roomstable th#price_highlight {
width: 76px;
min-width: 76px;
background: #00357f;
text-align: center;
}
th#price_highlight div.price-highlight-inner {
position: relative;
margin: 0;
padding: 0;
}
.roomArea th.canwrap {
white-space: normal;
}
.btnBooking-wrap .btn-acb {
width: 100%;
min-width: 110px;
color: #fff !important;
font-size: 13px !important;
}
.btnBooking-wrap .btn-acb {
border-collapse: collapse;
bottom: 0px;
box-shadow: rgb(170, 170, 170) 0px 0px 3px 0px;
color: rgb(255, 255, 255);
cursor: pointer;
height: 33px;
left: 0px;
min-height: 0px;
min-width: 110px;
position: relative;
right: 0px;
top: 0px;
vertical-align: middle;
width: 121px;
column-rule-color: rgb(255, 255, 255);
perspective-origin: 60.5px 16.5px;
transform-origin: 60.5px 16.5px;
background: rgb(8, 150, 255) none repeat scroll 0% 0% / auto padding-box border-box;
border: 2px solid rgb(255, 255, 255);
border-radius: 3px 3px 3px 3px;
font: normal normal bold normal 13px / 19.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
outline: rgb(255, 255, 255) none 0px;
padding: 5px 10px;
}
.btnBooking-wrap .btn-acb:hover {
background-color: #003580;
}
table.roomstable td.room-type-container {
border-right: 1px solid #5a97ee !important;
}
.bed-types-wrapper {
margin: 16px 8px;
line-height: 1.4;
}
.bed-types {
background: #e5ebfb;
padding: 5px 10px;
border-radius: 4px;
}
.bed-types label {
display: table;
font-size: 13px;
}
.bed-label {
font-weight: bold;
vertical-align: top;
}
.bed-type-select {
display: table-cell;
vertical-align: top;
padding-right: 5px;
}
.name-bed-types {
display: inline-block;
list-style-type: none;
padding: 0;
margin: 0;
}
.room-options {
margin-bottom: 13px;
font-size: 13px;
font-weight: lighter;
color: #390;
display: block;
margin-top: 3px;
}
.included-price-tax {
font-size: 13px;
text-align: left;
}
.room-options-wrapper span {
clear: left;
/*padding-left: 0!important;*/
padding-left: 4px!important;
}
table.roomstable td {
border-left: 1px solid #96b2d9;
padding: 6px;
}
.bb {
border-bottom: 1px solid #96b2d9;
}
<div id="rooms_table" style="margin: 0;">
<div id="available_rooms" style="margin-bottom: .5em;">
<form autocomplete="off" id="roomsFor" name="roomsFor" action="#" method="GET">
<div class="roomArea" id="maxHotelRoomArea">
<div id="individualRooms" class="rtshown">
<table class="roomstable roomstable-long-language">
<thead class style="width:814px; top:0px; z-index:auto">
<tr id="maxhotel_table_header">
<th class="canwrap" style="width:273px"> Accommodation Type</th>
<th class="occupancy-dropdown-header" style="width: 56px;">Max</th>
<th id="price_highlight" class="price-figure canwrap" style="width:76px;">
<div class="price-highlight-inner">
Price for 1 night
</div>
</th>
<th class="conditions" style="width:150px;">Your options</th>
<th id="number_rooms_header" class="canwrap" style="width:60px;">
Quantity
</th>
<th class="cyr-header canwrap" style="width:117px;">Confirm your reservation
</th>
</tr>
</thead>
<tbody id="room_availability_container">
<tr>
<td colspan="5" style="padding:0;"></td>
<td id="btnBooking" rowspan="400" style="min-width: 121px; background-color: rgb(255, 255, 255);">
<div class="btnBooking-wrap" style="display:block; width:121px; top:42px; padding-top:10px; z-index:auto">
<div id="booking_summary" style="display:none;">
DISPLAY BOOKING SUMMARY HERE
<span class="rooms-count">
<strong>1</strong> room selected
</span>
<span class="total-price">
BAM 60
</span>
<span class="breakfast-included">
Breakfast <strong>included</strong>
</span>
</div>
<button class="btn-acb">Reserve</button>
</div>
</td>
</tr>
<tr class="room-counter-1">
<td rowspan="4" class="roomId room-type room-type-container">
<a name="roomId" style="display:block; position:relative; top:-50px;"></a>
<div class="room-type-room-info" id="roomId"></div>
<span style="display:block;">
Standard Double Room
<div class="bed-types bed-types-wrapper">
<label class="bed-label">Choose your bed:</label>
<!--alttaki 2 label oda isminin detaylari.-->
<label>
<div class="bed-type-select">
<input type="radio" id="bedPreference_roomId"
name="bedPreference_roomId"
data-dojo-type="dijit/form/RadioButton"/>
</div>
<ul class="name-bed-types">
<li class="bed-type">
1 single bed
<div class="riba-beds"
style="font-size: 24px;"></div>
</li>
</ul>
</label>
<label>
<div class="bed-type-select">
<input type="radio" id="_beddPreference_roomId"
name="beddPreference_roomId"
data-dojo-type="dijit/form/RadioButton"/>
</div>
<ul class="name-bed-types">
<li class="bed-type">
1 large double bed
<div class="riba-double-bed"
style="font-size: 24px;"></div>
</li>
</ul>
</label>
</div>
<span class="room-options">
<div class="room-options-wrapper">
<span><div style="zoom:0.7;" class="riba-bell"></div> name</span>
<span><div style="zoom:0.7;" class="riba-air-conditioner"></div> name</span>
<span><div style="zoom:0.7;" class="riba-departures"></div> name</span>
<span><div style="zoom:0.7;" class="riba-family"></div> name</span>
</div>
</span>
<div class="included-price-tax">
<strong class="included-label">Included:</strong> 17% VAT, 1BAM city tax per person per night.
</div>
</span>
</td>
<td colspan="4" style="padding:0;"></td>
</tr>
<tr class="room-counter-1" id="roomIdx">
<td class="room-max-person bb" id="roomMaxPerson">
2
</td>
<td class="room-price bb" id="roomPrice">
<span class="room-price-span">195BAM</span>
</td>
<td class="option-policy bb" id="optionPolicy">
<span>test</span>
<span>test2</span>
</td>
<td class="room-num-dropdown bb" id="roomNumDropdown">
<select>
<option value="1">1 (200BAM)</option>
<option value="2">2 (350BAM)</option>
</select>
</td>
</tr>
<tr class="room-counter-1" id="roomIdxx">
<td class="room-max-person bb" id="roomMaxPersonx">
2
</td>
<td class="room-price bb" id="roomPricex">
<span class="room-price-span">195BAM</span>
</td>
<td class="option-policy bb" id="optionPolicyx">
<span>test</span>
<span>test2</span>
</td>
<td class="room-num-dropdown bb" id="roomNumDropdownx">
<select>
<option value="1">1 (200BAM)</option>
<option value="2">2 (350BAM)</option>
</select>
</td>
</tr>
<tr class="room-counter-1" id="roomIdxxx">
<td class="room-max-person bb" id="roomMaxPersonxx">
2
</td>
<td class="room-price bb" id="roomPricexx">
<span class="room-price-span">195BAM</span>
</td>
<td class="option-policy bb" id="optionPolicyxx">
<span>test</span>
<span>test2</span>
</td>
<td class="room-num-dropdown bb" id="roomNumDropdownxx">
<select>
<option value="1">1 (200BAM)</option>
<option value="2">2 (350BAM)</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</div>
</div>
The issue is that for some reason when in IE 9 (non-compatibility mode) one of the tds cause a goofy alignment. In this fiddle http://jsfiddle.net/2x3k3y5e/1/ the leftside button is fine it is the first of the right side buttons. For some reason it will not set on the right side. This is a part of user control (button bar) that will create various buttons for a page. ONLY in IE 9 have we noticed this issue. I would like to fix it everywhere and was hoping to use some css for this.
<table style="margin-top:10px;" cellspacing="0" cellPadding="0">
<tbody>
<tr>
<td noWrap="nowrap"> </td>
<td style="width: 100%;">
<input style="width: 125px;" id="BottomButtonBar_btnDelete" class="btnEntry" name="m$c$PatientSearchUC$PanelSearch$PanelSearch_BBB$BottomButtonBar_btnDelete" value="Previous Criteria" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="font-weight: normal; " id="BottomButtonBar_btnUpdate" class="btnEntry" value="Clear" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="width: 65px; font-weight: bold;" id="BottomButtonBar_btnUpdateAndReturn" class="btnPrimary btnEntry" value="Search" type="submit"/>
</td>
</tr>
</tbody>
</table>
CSS:
.btnEntry, .btnNav, .btnPrimary, .btnDefault{
text-transform: none;
cursor: pointer;
padding-right: 0;
padding: 6px 12px;
margin-left:0;
margin-right:0;
color: #000000;
min-width:60px;
}
.btnNav {
background-color: #fff;
border: #ccc 1px solid;
}
.btnEntry {
background-color: #ccc;
/*border: #b2b2b2 1px solid;*/
border: #ababab 1px solid;
color: #404040;
min-width:60px;
}
.btnDefault {
background-color: #ccc;
border: #ababab 1px solid;
color: #404040;
}
.btnPrimary {
color: #ffffff;
background-color: #82a83d;
}
If I set the size it is fine, but I don't think that using jquery to reset the size of a button to it's same size is a good solution. Again I am hoping there is some css trick that I don't know about to fix this. Thanks.
Side Note: I use IETester or a VM with Windows and IE 9
Try Float:right:
HTML:
<table style="margin-top:10px;" cellspacing="0" cellPadding="0">
<tbody>
<tr>
<td noWrap="nowrap"> </td>
<td style="width: 100%;">
<input style="width: 125px;" id="BottomButtonBar_btnDelete" class="btnEntry" name="m$c$PatientSearchUC$PanelSearch$PanelSearch_BBB$BottomButtonBar_btnDelete" value="Previous Criteria" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="font-weight: normal; " id="BottomButtonBar_btnUpdate" class="btnEntry btnClear" value="Clear" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="width: 65px; font-weight: bold;" id="BottomButtonBar_btnUpdateAndReturn" class="btnPrimary btnEntry" value="Search" type="submit"/>
</td>
</tr>
</tbody>
</table>
CSS:
.btnEntry, .btnNav, .btnPrimary, .btnDefault{
text-transform: none;
cursor: pointer;
padding-right: 0;
padding: 6px 12px;
margin-left:0;
margin-right:0;
color: #000000;
min-width:60px;
}
.btnClear{
float:right;
}
.btnNav {
background-color: #fff;
border: #ccc 1px solid;
}
.btnEntry {
background-color: #ccc;
/*border: #b2b2b2 1px solid;*/
border: #ababab 1px solid;
color: #404040;
min-width:60px;
}
.btnDefault {
background-color: #ccc;
border: #ababab 1px solid;
color: #404040;
}
.btnPrimary {
color: #ffffff;
background-color: #82a83d;
}
I have this HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<script type='text/javascript' src='js/jquery-1.10.2.min.js'></script>
<script type='text/javascript' src='js/knockout-3.0.0.js'></script>
<script type='text/javascript' src='js/myTasks.js'></script>
<link rel="stylesheet" type="text/css" href="css/walk.css">
<TITLE>Your Tasks</TITLE>
</HEAD>
<BODY>
<div class="screenSection">
<div class="sectionHeader">
<p>Your Tasks</p>
</div>
<div class="lines">
<table class="dataTable" id="CADataTable">
<thead>
<tr>
<th style="width: 15em;"> Project name</th>
<th style="width: 7em;"> Number</th>
<th style="width: 50em;"> description</th>
<th style="width: 5em;"></th>
</tr>
</thead>
<tbody data-bind="foreach: Assimilation">
<tr>
<td><input type="text" name="Name" id="Name" data-bind="value: Name" style="width: 15em;"></td>
<td><input type="text" name="Num" data-bind="value: Num" style="width: 7em;"></td>
<td><input type="text" name="Desc" data-bind="value: Desc" style="width: 50em;"></td>
<td style="width: 5em;">
<img src="img/close.jpg" alt="Close" data-bind="click: $root.removeAssimilation">
</td>
</tr>
</tbody>
</table>
<button type="button" id="export" class="button" data-bind="click: newAssimilation">Add new row</button>
</div>
</div>
</BODY>
</HTML>
Now everything is ok, but when I press the add new row button, I'm getting this ugly thing:
I'm using this css:
#CHARSET "UTF-8";
.formElement { height: auto; margin: 0 0.4em; padding: 0 0 0.5em 0.5em; min-width: 40%; display: inline-block;}
.formElement label {
display: block;
font-size: 1.7em;
margin: 0.8em 0 0.1em 0.15em;
width: 17.89em;
}
.formElement textarea { border: 1px solid #CCCCCC; padding: 2px; font-size: 1.15em; }
.formElement span { font-size: 1.05em; font-weight: bold; }
.lines { overflow: hidden; }
#commentInformation .formElement { width: 80%; }
input[type="text"] { border: 1px solid #CCCCCC; padding: 0.2em; height: 22px; width: 250px }
fileSelection { width: 50em; height: 30px; }
input:focus,textarea:focus,select:focus{
-webkit-box-shadow:0 0 6px #007eff;
-moz-box-shadow:0 0 5px #007eff;
box-shadow:0 0 5px #007eff; outline: none; }
td
{
background: #A9D0F5;
text-align: center;
height:2em;
}
th
{
height:2em;
}
.trClass
{
height:2em;
white-space: nowrap;
}
table
{
width: 98%;
font-size: 1.2em;
clear: both;
}
What I'm trying to do is to remove the blue space.
I'm 1000% sure that I'm making a small mistake somewhere, but it is my first css try. I'm a backend developer and it is really hard for me to spot any non sense things in the code. Please help me!
EDIT:
JSFIDDLE
Try this fiddle http://jsfiddle.net/37sbw/5/
you need to remove the
background: #A9D0F5;
applied for td
keep it like this
td
{
//background: #A9D0F5;
text-align: center;
height:2em;
}
I have even added
cellspacing="0px"
to the table to remove the spacing between the cells.
If cellspacing is not applied then go for this
table
{
border-spacing:0px;
}
Make Cell Spacing & Cell Padding as 0px
I am guessing you mean that the input field doesn't take up all the parent's width.
You have specified inline-style. This will override the CSS you've put in a seperate sheet.
<td><input type="text" name="Name" id="Name" data-bind="value: Name" style="width: 15em;"></td>
<td><input type="text" name="Num" data-bind="value: Num" style="width: 7em;"></td>
<td><input type="text" name="Desc" data-bind="value: Desc" style="width: 50em;"></td>
<td style="width: 5em;">
<img src="img/close.jpg" alt="Close" data-bind="click: $root.removeAssimilation">
</td>
Get rid of all the occurences of style="" and it should work as you expect it to work.
Additionally, change your CSS to this:
input[type="text"] {width: 100%;}
Set border-spacing of your table to 0:
table {
width: 98%;
font-size: 1.2em;
clear: both;
border-spacing: 0;
}
This will get rid of your white space between the cells.
jsFiddle
I have a table and i want 2 tds centered like
** Hello | World ** without adding empty tds before and after ?
I have something like this which works fine but i dont want to add extra tds and do it the same way
<table class="alignCenter" style="border:1px solid black">
<tr>
<td>
</td>
<td class="searchField">
<select id ="exactField">
<option value="default">Request num</option>
</select>
<input type="text" class="textBox" id="exactValue"/>
</td>
<td class="tableButtons">
<button type="button" class="clear" ><bdi>${Clear_Button}</bdi></button>
<button type="button" class="submit" ><bdi>${Search_Button}</bdi></button>
</td>
<td>
</td>
</tr>
</table>
CSS
table,.alignCenter {
width: 1000px;
margin: 0px auto;
text-align: left;
table-layout: fixed;
font-size: 0.9em;
}
table tr td,.alignCenter tr td {
overflow: hidden;
border: 1px solid black;
vertical-align: top;
padding: 5px 2px 5px 2px;
}
.alignCenter tr td {
text-align : center;
}
.tableButtons {
width:250px;
}
.searchField {
width:300px;
}
Fiddle
Why you even need 4 td's to accomplish something like that?
Just use a single td (I would use a simple div for this)
Demo
<table class="alignCenter" style="border:1px solid black">
<tr>
<td>
<select id ="exactField">
<option value="default">Request num</option>
</select>
<input type="text" class="textBox" id="exactValue"/>
<button type="button" class="clear" ><bdi>${Clear_Button}</bdi></button>
<button type="button" class="submit" ><bdi>${Search_Button}</bdi></button>
</td>
</tr>
</table>
would something like this work?
html..
<table style="border:1px solid black">
<tr>
<td class="alignright" >
<select id ="exactField">
<option value="default">Request num</option>
</select>
<input type="text" class="textBox" id="exactValue"/></td>
<td class="alignleft" >
<button type="button" class="clear" ><bdi>${Clear_Button}</bdi></button>
<button type="button" class="submit" ><bdi>${Search_Button}</bdi></button>
</td>
</tr>
</table>
css..
table,.alignright {
width: auto;
margin: 0px auto;
text-align: right;
table-layout: fixed;
font-size: 0.9em;
}
table,.alignleft {
width: auto;
margin: 0px auto;
text-align: left;
table-layout: fixed;
font-size: 0.9em;
}
.tableButtons {
width:250px;
}
.searchField {
width:300px;
}
FIDDLE