The issue is that I have a div list of ott-col-right-inner but when I tried to add the table under id the border in that div goes through. here is it's css:
.point-count:before {
content: '';
position: absolute;
border-bottom: none;
left: 48px;
border-left: solid 4px #F3F3F3;
height: 100%;
top: 30px;
}
I only want the border to stop in the point-count div
Here is the JSfiddle link:
https://jsfiddle.net/q6pmaebj/
code in question:
<div class="ott-col-right-inner">
<div class="point-count"><h3>01</h3></div>
<div class="point-text"><p>Step 1</p></div>
</div>
<div class="ott-col-right-inner">
<div class="point-count"><h3>02</h3></div>
<div class="point-text"><p>Step 2</p></div>
</div>
<div class="ac">
<table style="width: 100%; border-collapse: collapse; table-layout: fixed; border: 1px solid #99acc2;">
<tbody>
<tr>
<td style="border: 0.5pt solid #000000; width: 100%; padding: 4px;">
<p>One</p>
</td>
</tr>
<tr>
<td style="border: 0.5pt solid #000000; width: 100%; padding: 4px;">
<p>Two</p>
</td>
</tr>
</tbody>
</table>
</div>
I tried to do something with nth-last child where I take the border out in the last bit, but this seems to be not working:
.point-count:last-child:before { border-left: none; }
Note: I cannot change the div tags because this is in a for each loop
After looking through the jsfiddle link it looks like the solution is that the ott-col-right div tag wasn't closed and by adding that we were able to take the styling and only apply it to what is enclosed in the tag. I'm learning myself so let me know if this works for you!
Screenshot from jsfiddle with the closing tag
add this css
.point-count:before {
content: '';
position: absolute;
border-bottom: none;
left: 35px; //change here
border-left: solid 4px #F3F3F3;
height: 100%;
top: -30px; //change here
}
.ott-col-right-inner{
position: relative;
}
.ott-col-right-inner:first-child .point-count:before{
top: 10px;
}
fiddle here
it's not border, it's the child's before and you set its height to 100%, so that's why. you need to manage its height properly. here I set it only 200px
.ott-col-right {
flex: 0 0 50%;
max-width: 50%;
position: relative;
overflow: hidden;
margin-bottom: 20px;
padding-right: 15px;
padding-left: 15px;
}
.point-count {
margin: 0px;
float: left;
width: 70px ;
height: 70px ;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: #F3F3F3;
}
.point-count h3 {
z-index: 1;
color: #3E3E3E;
font-size: 23px;
font-weight: 600;
}
.point-text {
text-align: left;
float: left;
width: calc(100% - 100px);
height: 70px;
display: flex;
align-items: center;
margin: 0px auto;
margin-left: 20px;
}
.ott-col-right-inner {
width: 100%;
display: block;
float: left;
padding: 10px 0px;
}
.point-text p {
font-family: "Exo 2", sans-serif;
color: #828389;
font-size: 16px;
margin: 0px 5px;
}
.point-text p a {
color: #CE1126;
font-size: 15px;
font-weight: 700;
position: relative;
}
.point-count:nth-child(1):before {
content: '';
position: absolute;
border-bottom: none;
left: 48px;
border-left: solid 4px #F3F3F3;
height: 200px;
top: 30px;
}
.ott-col-right-inner:last-child {
padding-bottom: 0px;
}
.vidyard-player-container
{
border-radius: 20px;
}
<div class="ott-col-right">
<div class="ott-col-right-inner">
<div class="point-count"><h3>01</h3></div>
<div class="point-text"><p>Step 1</p></div>
</div>
<div class="ott-col-right-inner">
<div class="point-count"><h3>02</h3></div>
<div class="point-text"><p>Step 2</p></div>
</div>
<div class="ott-col-right-inner">
<div class="point-count"><h3>03</h3></div>
<div class="point-text"><p>Step 3</p></div>
</div>
<div class="ac">
<table style="width: 100%; border-collapse: collapse; table-layout: fixed; border: 1px solid #99acc2;">
<tbody>
<tr>
<td style="border: 0.5pt solid #000000; width: 100%; padding: 4px;">
<p>One</p>
</td>
</tr>
<tr>
<td style="border: 0.5pt solid #000000; width: 100%; padding: 4px;">
<p>Two</p>
</td>
</tr>
</tbody>
</table>
</div>
Related
I am building a custom chips control and facing a problem in aligning a close div to the right and middle. Can someone help please. I want to align the close button vertically middle if the text wraps to multiple lines
<div class="chips-container">
<div *ngFor="let item of items; let i = index" class="chips">
<div class="chip-text">{{ item }}</div>
<div class="chip-close">x</div>
</div>
<input
class="input-chips"
(keyup.enter)="add($event)"
(keyup)="autogrow($event)"
style="width: 15px"
/>
</div>
My Style
.chips-container {
border: 1px solid gray;
height: auto;
min-height: 30px;
width: 230px;
position: relative;
}
.chips {
background-color: rgb(236, 236, 236);
border: 1px solid rgb(124, 124, 124);
border-radius: 14px;
margin: 3px;
padding-left: 3px;
height: auto;
display: inline-block;
}
.chip-text {
display: inline-block;
vertical-align: middle;
word-wrap: break-word;
}
.chip-close {
background-color: rgb(204, 204, 204);
height: 20px;
width: 20px;
border-radius: 50%;
//display: inline-block;
text-align: center;
margin-left: 2px;
float: right;
}
I replaced my Divs with table layout and it looks good, however, my input text control aligns in the bottom
<div class="chips-container">
<table
*ngFor="let item of pgFilters[i].value; let i = index"
class="chips"
>
<tr>
<td class="chip-text">{{ item }}</td>
<td><div class="chip-close">x</div></td>
</tr>
</table>
<input
style="width: 15px"
/>
</div>
Use positioning, put relative position on the parent element, in your case: .chips, and then relative position on the .chip-close, and then position it as you wish. Btw also added padding-right on the text itself, just so the word wouldn't overlap with the x icon.
.chips-container {
border: 1px solid gray;
height: auto;
min-height: 30px;
width: 230px;
position: relative;
}
.chips {
background-color: rgb(236, 236, 236);
border: 1px solid rgb(124, 124, 124);
border-radius: 14px;
margin: 3px;
padding-left: 3px;
height: auto;
position: relative;
}
.chip-text {
display: inline-block;
word-wrap: break-word;
padding-right: 20px;
}
.chip-close {
background-color: rgb(204, 204, 204);
height: 20px;
width: 20px;
border-radius: 50%;
text-align: center;
position: absolute;
top: 50%;
right: 2px;
transform: translateY(-50%);
}
<div class="chips-container">
<div *ngFor="let item of items; let i = index" class="chips">
<div class="chip-text">this is just a test tjak jldskfds lsdjkf kjdf eljf lsadjfoi lajkdfoasdfkj </div>
<div class="chip-close">x</div>
</div>
<input
class="input-chips"
(keyup.enter)="add($event)"
(keyup)="autogrow($event)"
style="width: 15px"
/>
</div>
I have a table inside of div and I am trying to set the width so that the columns on the output fill the whole div with id left.
Here is all the code and along with jsfiddle : https://jsfiddle.net/qsogubjd/
#sortPanel {
width: 565px;
height: 165px;
margin: 10px 15px;
display: block;
border: 0px solid #fff;
}
#sortPanel td {
height: 165px;
width: 11px;
overflow: hidden;
display: inline-block;
white-space: nowrap;
padding: 0;
position: relative;
}
.cc {
display: block;
width: 5px;
position: absolute;
bottom: 0px;
background-color: #999;
border-top: 4px solid #fff;
margin: 0px;
margin-top: 4px;
}
.ccH1 {
display: block;
width: 5px;
background-color: #F22613;
margin: 0px;
position: absolute;
bottom: 0px;
}
.ccH2 {
display: block;
width: 5px;
background-color: #F2B705;
margin: 0px;
position: absolute;
bottom: 0px;
}
#left {
width: 590px;
height: 190px;
margin: 10px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 3px #000;
-moz-box-shadow: 0 1px 3px #000;
border-top: 1px solid #555;
box-shadow: 0 1px 3px #000;
background: -webkit-linear-gradient(#444, #333);
background: -moz-linear-gradient(#444, #333);
background: -o-linear-gradient(#444, #333);
background: -ms-linear-gradient(#444, #333);
background: linear-gradient(#444, #333);
position: relative;
float: left;
}
<div id="left">
<table id="sortPanel">
<tr>
<td id="b0">
<div class="cc" style="height: 144px;"></div>
</td>
<td id="b1">
<div class="cc" style="height: 35px;"></div>
</td>
<td id="b2">
<div class="cc" style="height: 6px;"></div>
</td>
<td id="b3">
<div class="cc" style="height: 64px;"></div>
</td>
<td id="b4">
<div class="cc" style="height: 12px;"></div>
</td>
<td id="b5">
<div class="cc" style="height: 153px;"></div>
</td>
<td id="b6">
<div class="cc" style="height: 70px;"></div>
</td>
<td id="b7">
<div class="cc" style="height: 137px;"></div>
</td>
<td id="b8">
<div class="cc" style="height: 19px;"></div>
</td>
<td id="b9">
<div class="cc" style="height: 131px;"></div>
</td>
</tr>
</table>
</div>
So far I tried putting position: relative; on selectors, it didn't work. Then I tried display: block;, it didn't work either.
To make reading code easier:
The width attribute of td defines the seperation between the columns in the html output. Increasing the value of width will set columns further for each other, spreading them.
While width of div inside of td sets the width of column itself. Increasing this value will make colums thicker.
As far as I researched the solution should include %: width: someValue%.
How can I change the css code in order to spead the columns across the div with id "left" and make the whole table responsive?
The following caused the issue:
table#sortPanel has a display: block;
td.cc has a display: block;
table has a defined width (565px)
td has a defined width (5px)
td's naturally expand to occupy full width of the table without the need of any css.
When td's are given display: block, they loose this natural property.
Just remove these styles and td's will occupy full span of the table.
Give table a width: 100% and it'll occupy the full span of div#left.
Here is your code with modifications:
<div id="left">
<table id="sortPanel">
<tr>
<td id="b0">
<div class="cc" style="height: 144px;"></div>
</td>
<td id="b1">
<div class="cc" style="height: 35px;"></div>
</td>
<td id="b2">
<div class="cc" style="height: 6px;"></div>
</td>
<td id="b3">
<div class="cc" style="height: 64px;"></div>
</td>
<td id="b4">
<div class="cc" style="height: 12px;"></div>
</td>
<td id="b5">
<div class="cc" style="height: 153px;"></div>
</td>
<td id="b6">
<div class="cc" style="height: 70px;"></div>
</td>
<td id="b7">
<div class="cc" style="height: 137px;"></div>
</td>
<td id="b8">
<div class="cc" style="height: 19px;"></div>
</td>
<td id="b9">
<div class="cc" style="height: 131px;"></div>
</td>
</tr>
</table>
</div>
#sortPanel {
//width: 565px;
width: 100%;
height: 165px;
margin: 10px 0x;
//display: block;
display: table;
border: 0px solid #fff;
}
#sortPanel td {
height: 165px;
//width: 11px;
overflow: hidden;
//display: inline-block;
white-space: nowrap;
padding: 0;
position: relative;
vertical-align: bottom;
}
.cc {
display: block;
//width: 5px;
width: 100%;
//position: absolute;
bottom: 0px;
background-color: #999;
border-top: 4px solid #fff;
margin: 0px;
margin-top: 4px;
}
.ccH1 {
display: block;
width: 5px;
background-color: #F22613;
margin: 0px;
position: absolute;
bottom: 0px;
}
.ccH2 {
display: block;
width: 5px;
background-color: #F2B705;
margin: 0px;
position: absolute;
bottom: 0px;
}
#left {
width: 590px;
//height: 190px;
margin: 10px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 3px #000;
-moz-box-shadow: 0 1px 3px #000;
border-top: 1px solid #555;
box-shadow: 0 1px 3px #000;
background: -webkit-linear-gradient(#444, #333);
background: -moz-linear-gradient(#444, #333);
background: -o-linear-gradient(#444, #333);
background: -ms-linear-gradient(#444, #333);
background: linear-gradient(#444, #333);
position: relative;
float: left;
}
https://jsfiddle.net/cpr4ztvj/
You have to delete some of the unnecessary attribute value pairs specifically related to display and position, those are very important in css, be sure to read up on them. I added the changes in the comments of css code and also I will share fiddle link to check the responsiveness https://jsfiddle.net/nukjh6ea/, now you may add up td s as you want.
#sortPanelA, sortPanelB {
width: 100%;/* occupy the whole width of div left */
height: 165px;
margin: 10px 15px;
border: 0px solid #fff;
}
#sortPanelA td, sortPanelB td {
height: 165px;
overflow: hidden;
white-space: nowrap;
padding: 0;
position: relative;
}
.cc {
display: block;
width: 50%;/* the width of column, you may play around with it */
position: absolute;
bottom: 0px;
background-color: #999;
border-top: 4px solid #fff;
margin: 0px;
margin-top: 4px;
}
.ccH1 {
display: block;
width: 5px;
background-color: #F22613;
margin: 0px;
position: absolute;
bottom: 0px;
}
.ccH2 {
display: block;
width: 5px;
background-color: #F2B705;
margin: 0px;
position: absolute;
bottom: 0px;
}
#left {
width: 90%;/* take up the 90% of body */
height: 190px;
margin: 10px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 3px #000;
-moz-box-shadow: 0 1px 3px #000;
border-top: 1px solid #555;
box-shadow: 0 1px 3px #000;
background: -webkit-linear-gradient(#444, #333);
background: -moz-linear-gradient(#444, #333);
background: -o-linear-gradient(#444, #333);
background: -ms-linear-gradient(#444, #333);
background: linear-gradient(#444, #333);
position: relative;
float: left;
}
<div id="left">
<table id="sortPanelA">
<tr>
<td id="b0">
<div class="cc" style="height: 144px;"></div>
</td>
<td id="b1">
<div class="cc" style="height: 35px;"></div>
</td>
<td id="b2">
<div class="cc" style="height: 6px;"></div>
</td>
<td id="b3">
<div class="cc" style="height: 64px;"></div>
</td>
<td id="b4">
<div class="cc" style="height: 12px;"></div>
</td>
<td id="b5">
<div class="cc" style="height: 153px;"></div>
</td>
<td id="b6">
<div class="cc" style="height: 70px;"></div>
</td>
<td id="b7">
<div class="cc" style="height: 137px;"></div>
</td>
<td id="b8">
<div class="cc" style="height: 19px;"></div>
</td>
<td id="b9">
<div class="cc" style="height: 131px;"></div>
</td>
</tr>
</table>
</div>
Change .cc {width: 100%} and #sortPanelA td {width: 3.5rem}
EDIT
To make whole table responsive here are steps:
change div, table and tbody width to 100%
set table display: table
remove td width
set div.cc to 100%
set , not with css
Here is the code in fiddle: https://jsfiddle.net/meshin/uuL2f43g/
You're mixing and matching different block models without understanding what they do. A table block model is pretty responsive by default and by adding blocks and inline-blocks to things you're complicating matters.
Remove all the display: block and display: inline-block from your table elements. Then set the .cc div to 100% width of the table cell. Your table will then scale to whatever you need. If you want it 100% set the table to 100%.
See example:
https://jsfiddle.net/mede6n8j/
Steps to fix:
Remove display: block; from #sortPanelA, sortPanelB
Remove display: block and display:inline-block; from #sortPanelA td, sortPanelB td
Remove width: 11px; from #sortPanelA td, sortPanelB td
Change width: 5px; to width: 100% on .cc. This will make the divs scale to the table-cells
I would recommend you to first try making the table width 100% , It should work.
In case if it does not work then since you have 9 td's in a row try setting the td with to 11.11%. But if you have n number of td then it will not work.
Regards,
Vinit Patil.
I am trying to make a product summary box for the following page:
I was playing around to set the border on the following divs:
<div style="border:1px solid black;" class="inner">
<div style="padding-bottom: 14px;border:1px solid black;" class="title">
The result looks like the following:
I would like to let it look like that:
Any suggestions how to set the divs properly? Or would it be better to design a backgroud image to fit the box?
I appreciate your replies!
You could use a tableinstead of DIVs whose cell borders you make visible.
Or use display: table , display: table-row and display: table-cell for the DIVs, again defining a border for the cell elements.
This is a 5-minute CSS solution:
* {
box-sizing: border-box;
font-family: sans-serif;
}
.product {
border: 2px solid #999;
border-radius: 2px;
width: 20em;
}
.product--header,
.product--image,
.product--rating {
width: 100%;
border-bottom: 2px solid #999;
}
.product--header h2, .product--header h3 {
text-align: center;
padding: 0.25em 0 0.5em;
margin: 0;
}
.product--image img {
width: 100%;
padding: 0.25em;
z-index: 1;
}
.product--image {
position: relative;
}
.product--pricetag {
position: absolute;
z-index: 2;
left: 0;
top: 1em;
color: white;
background: rgba(0, 0, 0, 0.75);
text-align: center;
width: 40%;
padding: 0.5em;
}
.product--rating p {
text-align: center;
}
.product--links {
width: 100%;
margin: 0.5em;
}
.product--links a.btn {
display: block;
color: white;
background: blue;
text-align: center;
width: 90%;
margin-left: 2.5%;
padding: 0.5em;
margin-bottom: 0.25em;
}
<div class="product">
<div class="product--header">
<h2>Test Product</h2>
<h3>Price Class: $$ | P3 | 14</h3>
</div>
<div class="product--image">
<img src="http://placekitten.com/200/200" alt="cat">
<p class="product--pricetag">
999 $
</p>
</div>
<div class="product--rating">
<p>Rating: 4/5</p>
</div>
<p class="product--links">
<a class="btn">Buy on Amazon</a>
<a class="btn">Other Sizes</a>
</p>
</div>
I wouldn't recommend a background frame image, because it's a pain to work with and loading it is a waste of bandwidth.
Put four borders on the container, then just add border-bottom in each child, except on the last.
.container-bordered {
border: 2px solid red;
}
.container-bordered > div:not(:last-of-type) {
border-bottom: 2px solid red;
}
https://jsfiddle.net/cqjxuype/
I want to add a vertical line between the multiple divs so that it looks like the attached image:
I'm trying to achieve that by adding a div .border and setting its position absolute. However I want to add some margin between the border and make the border appear behind the boxes as in above image.
Here's the code I'm trying:
HTML:
<div class="wrap">
<div class="box">
<div class="border"></div>
<div class="figure"></div>
<div class="right"> right</div>
</div>
<div class="box">
<div class="border"></div>
<div class="figure"></div>
<div class="right"> right</div>
</div>
<div class="box">
<div class="border"></div>
<div class="figure"></div>
<div class="right"> right</div>
</div>
</div>
CSS:
.wrap{
position: relative;
overflow: hidden;
}
.box{
overflow: hidden;
margin-top: 50px;
}
.box:first-child{
margin-top: 0;
}
.figure{
width: 50px;
height: 50px;
background: yellow;
display: inline-block;
margin-right: 10px;
}
.right{
display: inline-block;
}
.border{
border-right: 3px solid red;
height: 100%;
left: 24px;
position: absolute;
top: 0;
width: 1px;
}
.box:last-child .border{
display: none;
}
JSFiddle:
http://jsfiddle.net/w5TY9/
Here you go.
WORKING DEMO
The HTML:
<div class="wrap">
<div class="box">
<div class="border"></div>
<div class="figure"></div>
<div class="right"> </div>
</div>
<div class="box">
<div class="border"></div>
<div class="figure"></div>
<div class="right"> </div>
</div>
<div class="box">
<div class="border"></div>
<div class="figure"></div>
<div class="right"> </div>
</div>
</div>
The CSS:
.wrap{
position: relative;
overflow: hidden;
}
.box{
overflow: hidden;
margin-top: 50px;
}
.box:first-child{
margin-top: 0;
}
.figure{
width: 50px;
height: 50px;
background: yellow;
display: inline-block;
margin-right: 10px;
}
.right{
display: inline-block;
}
.border {
border-right: 3px solid #FF0000;
height: 98%;
left: 24px;
position: absolute;
top: 0;
width: 1px;
z-index: -1;
}
.box:last-child .border{
display: none;
}
.figure {
background: none repeat scroll 0 0 #FFFF00;
border-bottom: 12px solid #FFFFFF;
border-top: 12px solid #FFFFFF;
display: inline-block;
height: 50px;
margin-right: 10px;
width: 50px;
}
The CSS Changes:
.border {
border-right: 3px solid #FF0000;
height: 98%;
left: 24px;
position: absolute;
top: 0;
width: 1px;
z-index: -1;
}
.figure {
background: none repeat scroll 0 0 #FFFF00;
border-bottom: 12px solid #FFFFFF;
border-top: 12px solid #FFFFFF;
display: inline-block;
height: 50px;
margin-right: 10px;
width: 50px;
}
Hope this helps.
.border{z-index: -1;} use this
And see link http://jsfiddle.net/bipin_kumar/w5TY9/2/
.figure{
width: 50px;
height: 50px;
background: yellow;
display: inline-block;
margin-right: 10px;
z-index:1;
border:3px solid white;
}
.border{
border-right: 3px solid red;
height: 100%;
left: 24px;
position: absolute;
top: 0;
width: 1px;
z-index:-1;
}
replace your classes with mine, you will get both effects
.border{
border-right: 3px solid red;
height: 100%;
left: 24px;
position: absolute;
top: 0;
width: 1px;
}
Class need to be added the following property and value
z-index: -1;
In your css you need to add the following two rules for the .border class:
z-index: -1;
margin-left: -1px
The first line puts the line behind the boxes. So in the vertical space without boxes the line shows up.
One small improvement for centering the border perfectly under the boxes:
Your border is 3px width so the border should be moved at least 1px to the left in order to stay centered. With margin-left: -1px you get the correct result. If you want the border to be completely perfect centered you should either use a border with of 4px and a margin-left of -1px or a border with of 2px and a margin-left of 1px;
see http://jsfiddle.net/w5TY9/1/
Add z-index=-1 to border class.
check this fiddle
What you want is very easy. The short version is like this:
<div style="background-color:yellow; height:30px;width:30px;"> </div>
<div style="background-color:red; height:30px; width:5px; margin-left:10px;"> </div>
In this way you have a square with background yellow and below that you have a red line
with 5px width or whatever you want.
It's not a massive deal but would like consistency across browsers and the document would be easier read if it fills the box. In Chrome, increasing the 'width' only increases the margin around the pdf and not itself as it does in Firefox. Any ideas appreciated.
.box {
height: 70%;
margin-left: 22%;
margin-top: 6%;
width: 57%;
}
<div class="box">
<object data="/name.pdf" type="application/pdf" width="100%" height="100%">
<p>It appears you don't have a PDF plugin for this browser.</p>
</object>
</div>
EDIT: I have added some parameters on the pdf such as ..name.pdf#zoom=100%" but still does not change up in Chrome. Anyone ? ?
Just use iframe instead of object if you don't need the data of pdf,
<div class="tip-win is-display">
<div class="tip-head">
<span class="tip-title">Tips</span>
<span class="close-btn" id="close-btn">✖</span>
</div>
<div class="tip-content" id="tip-content">
<div>This is a test message</div>
</div>
<div class="tip-foot">
<a class="mini-button blue tip-btn" id="ok-btn">ok</a>
<a class="mini-button blue tip-btn" id="cancel-btn">cancel</a>
</div>
</div>
<div class="tip-div">
<iframe id="tip-iframe" class="tip-iframe is-display" height="422" width="602" ></iframe>
</div>
<div class="pdf-iframe" id="targetElementID">
<iframe id="ipdf" src="yyytest.pdf" height="100%" width="100%"></iframe>
</div>
css:
.tip-win {
position: absolute;
z-index: 100;
background: #f6f6f6;
border: 1px solid #bbb;
height: 420px;
width: 600px;
top: 15%;
left: 30%
}
.tip-div {
position: absolute;
z-index: 20;
top: 15%;
left: 30%
}
.pdf-iframe {
position: absolute;
z-index: 10;
margin-top: 45px;
height: 90%;
width: 100%
}
.tip-iframe{
border:none;
}
.is-display{
display: none;
}
.tip-head{
border-bottom: 1px solid #ddd;
background: #eee;
}
.tip-title{
display: inline-block;
margin: 5px 20px;
}
.close-btn{
height: 32px;
line-height: 32px;
float: right;
text-align: center;
width: 32px;
border-left: 1px solid #bbb;
}
.close-btn:hover{
cursor: pointer;
background: #ccc;
}
.tip-content{
height: 336px;
overflow-y: scroll;
padding-left: 20px;
}
.tip-foot{
border-top: 1px solid #ddd;
padding: 10px;
text-align: center;
background: #eee;
}
.tip-btn{
font-size: 12px;
padding: 4px 16px !important;
}
<script>
$('#tip-content').html(message);
$('.is_display').css('display','block');
$('.sb-btn').attr('disabled','disabled');
$('.tip-btn').click(function(){
var id = $(this).attr('id');
if(id==="ok-btn"){
closeTip();
send2SB02();
}else{
closeTip();
}
});
// “X”
$('#close-btn').click(closeTip);
function closeTip() {
$('.is_display').css('display','none');
$('.sb-btn').removeAttr('disabled');
return false;
}
</script>