Break word in table in Edge - html-table

I have a table like this:
<div class="container">
<div class="row">
<div class="col-12">
<table>
<tbody>
<tr>
<td>some content</td>
<td>http://insertreallylongurlhere</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
I'm using this css:
body {word-break: break-word;}
On mobile (or at small screen sizes) on Edge, the long url won't break and overflows off-screen.
It works fine except for in Edge. I know Edge doesn't really like word-break: break-word.
So, I've tried word-wrap: break-word and overflow-wrap: break-word on both the table and on the td. However, it seems like tables don't like that.
If I add table-layout: fixed and a width (such as width: 100%) to my table, the words wrap properly, but the width style breaks my table. It breaks out of my containing div.
Does anyone know another solution to this issue?

Try to use the overflow-wrap: break-word; property, more detail information, please check the overflow-wrap CSS property.
Besides, you could also try to use the word-break: break-all; property, instead of word-break: break-word;
<style>
body {
word-break: break-word;
}
table td {
width: 100px;
word-break:break-all;
}
</style>
<div class="container">
<div class="row">
<div class="col-12">
<table border="1">
<tbody>
<tr>
<td>some content</td>
<td>http://insertreallylongurlhere</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
The result like this:

Related

cypress clicking on an icon within a table

I am having hard time clicking on an individual icon within this table shown bellow.
I tried the code bellow , but did not work
cy.get('table >tbody >tr td:nth-child(1) fa-icon:nth-child(1)').click({multiple: true})
Visual:
Inspected DOM:
DOM text:
<div _ngcontent-ixx-c110 stickything class="d-block grid is-sticky" style="z-index: 1; top: 0px; width: auto; left: auto; position: sticky;">
<div _ngcontent-ixx-c110 class="d-flex ng-star-inserted">
<table _ngcontent-ixx-c110 class="table table-sm table-bordered">
<thead _ngcontent-ixx-c110 class="bg-color text-center text-black">...</thead>
<tbody _ngcontent-ixx-c110 class="text-center ng-star-inserted">
<tr _ngcontent-ixx-c110 class="bg-addition ng-star-inserted">
<td _ngcontent-ixx-c110 class="stickyContainertd ng-star-inserted" style="width: 20px; padding-top: 4px !important;">
<fa-icon _ngcontent-ixx-c110 size="sm" class="ng-fa-icon ng-star-inserted" css="6">...</fa-icon>
<!-- -->
<!-- -->
Performance insights
</td>
</tr>
...
</tbody>
</table>
</div>
</div>
You'll need to add an :nth-child() to the row (<tr>) as well as column (<td>), presuming the rows all have the same pattern of content.
For example:
cy.get('table >tbody >tr:nth-child(1) td:nth-child(1) fa-icon:nth-child(1)')
.should('have.length', 1)
.click()
or .eq() works
cy.get('table tbody')
.find('tr').eq(0)
.find('td').eq(0)
.find('fa-icon').eq(0)
.should('have.length', 1)
.click()

How Do I Click a div dropdown menu using VBA IE automation

Have the following DIV class, where you click on the bottom it will create a drop down menu. In browser, you can click it with mouse, however with IE automation with VBA. I tried the ".click" method and doesn't work.
I also tried the FireEvent with "onclick" "onchange" "onmouseover" and nothing works. Trying to see if there is any other solution
<div id="add12" style="width: 47px; height: 23px; white-space: nowrap;
position: static;"
controltype="DropDown" param="par">
<input name="ct10115" id="ddl" type="hidden" value="E">
<input class="ffb-input" id="input" style="width: 13px;" maxlength="1"
autocomplete="off">
<span class="ffb-arrow ui-button ui-widget ui-state-default ui-corner-Allui-button-text-icon-primary" id="teste2" role="button" ariadisabled="false" style="position:
static;">
<span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-s"
style="left: 0px; top: 0px; margin-top: 0px; position: static;"></span>
<span class="ui-button-text"></span>
</span>
<div class="ffb" id="example11" style="left: 0px; top: 29px; width: 450px; display: none; z- index: 21; opacity: 0.999;">
<div class="content" style="height: auto; max-height: 200px;" scrolltop="0">
<div class="row" id="A" val="A" std_phase_cd="A" std_nm="A_">
<table>
<tbody>
<tr>
<td style="width: 45px;">A </td>
<td>none A </td>
</tr>
</tbody>
</table>
</div>
<div class="row" id="B" val="B" std__cd="B" std_nm="1">
<table>
<tbody>
<tr>
<td style="width: 45px;">B </td>
<td>none1 </td>
</tr>
</tbody>
</table>
</div>
</div>
<div></div>
</div>
</div>
ok I got it figured out.
So I use the dev tool on browser, and found the event e.g. click, mousedown etc.
then I use IE.dipatchEvent to trigger the click event.

Scrollable table in flex layout

I'm trying to create an HTML layout with header, footer and 3 content sections. It does work for simple sections; however for the code below, I get table2 spanning past footer:
<html>
<body style="display: flex; flex-direction: column">
<header style="text-align: center">
Header
</header>
<section style="display: flex; flex-direction: row; flex: 1">
<section>
<table style="border-style: dotted">
<thead>
<tr><th>Col1</th><th>Col2</th><th>Col2</th></tr>
</thead>
<tbody>
<tr><td>Val1</td><td>Val2</td><td>Val3</td></tr>
</tbody>
</table>
<br/>
<table id="table2" style="border-style: dotted">
<thead>
<tr><th>Col1</th><th>Col2</th><th>Col2</th></tr>
</thead>
<tbody>
<tr><td>Val1</td><td>Val2</td><td>Val3</td></tr>
<tr><td>Val1</td><td>Val2</td><td>Val3</td></tr>
<tr><td>Val1</td><td>Val2</td><td>Val3</td></tr>
<tr><td>Val1</td><td>Val2</td><td>Val3</td></tr>
<tr><td>Val1</td><td>Val2</td><td>Val3</td></tr>
<tr><td>Val1</td><td>Val2</td><td>Val3</td></tr>
</tbody>
</table>
</section>
<section style="border-style: dotted">test</section>
<section style="border-style: solid">another</section>
</section>
<footer>
Footer
</footer>
</body>
</html>
Is it possible to make table2 scrollable, ideally only tbody part?

dynamic jquery accordion not working in vue.js

I have requirement when I am creating accordion dynamically. I have a list using which, i will filter the record and create accordion based on selected date. Below is the code for accordion
<div id="accordion" class="accordion" style="margin-top:20px;" class="div-shadow col-md-12 col-lg-12 col-sm-12 col-xs-12">
<template v-for="invGroup in invGroupTotals">
<label>{{invGroup.Group}}<span style="float:right; font-size:12px" v-if="invGroup.DiffTotal === 0 && invGroup.DiffAmtTotal === zero" class="text-success"> No Difference </span><span class="text-danger" style="float:right; font-size:12px" v-else>Difference Count {{invGroup.DiffTotal}} , Amount ${{invGroup.DiffAmtTotal}}</span></label>
<div style="text-align: center; background-color: white; overflow-y:auto;" >
<table cellpadding="10" style="border-style: solid; border-color: Gray; border-collapse: separate;border-spacing: 2px" class="table tableStyle col-md-12 col-lg-12 col-sm-12 col-xs-12">
<tr>
<th v-for="column in weeklyReconcileGridColumns">{{column}}</th>
</tr>
<template v-for="item in weeklyReconcileList">
<tr v-if="invGroup.Group === item.UPCGroup">
<td >{{item.UPCID}}</td>
<td class="text-left" v-on:click="showItemHistory(item.UPCID, item.UPCDesc)">{{item.UPCDesc}}</td>
<td >{{item.SystemBOH}}</td>
<td >{{item.CurrentWeekBOH}}</td>
<td >{{item.Diffrence}}</td>
<td >{{parseFloat(item.TotalSalesAmount).toFixed(2)}}</td>
</tr>
</template>
<tr>
<td class="text-center" colspan="2"> Total</td>
<td> {{invGroup.SysTotal}}</td>
<td> {{invGroup.CountedTotal}}</td>
<td> {{invGroup.DiffTotal}}</td>
<td> {{invGroup.DiffAmtTotal}}</td>
</tr>
</table>
</div>
The problem is, suppose on the first load 2 accordion is shown. When changed the date there are three accordion then the accordion style is not applied in third one. I am calling the accordion in Updated Hook as shown below.
updated: function () {
$("#accordion").accordion();}
Could you please suggest how can i correct the issue. thanks in advance.
I made it working by refreshing the accordion. The only thing we need to take care is refreshing after accordion is instantiated. check other methods click here.

Bootstrap3 . Can I Embed a fixed region within a responsive site?

I am using Bootstrap 3 in responsive mode. Is it possible to embed a region or regions on the site to be fixed rather then responsive. A fixed width table, for example?
Sure! Just don't use class="table" attribute on table definition.
<div class="container">
<div class="row">
<div class="col-md-8">
<table width="200">
<tr>
<td>cell1</td>
<td>cell2</td>
</tr>
<tr>
<td>cell3</td>
<td>cell4</td>
</tr>
</table>
</div>
<div class="col-md-4">sidebar</div>
</div>
</div>
Example https://jsfiddle.net/DTcHh/16851/