Java/HTML - prevent outlook from wrapping text in table - java

I have a css defined as follows:
body {
font-size: 80%;
font-family: Calibri;
}
table.gridtable {
color:#333333;
text-align: center;
border-width: 1px;
border-color: #666666;
border-collapse: collapse;
}
table.gridtable th {
border-width: 1px;
white-space:nowrap;
padding: 8px;
border-style: solid;
border-color: #666666;
background-color: #dedede;
}
table.gridtable td {
border-width: 1px;
white-space:nowrap;
padding: 8px;
border-style: solid;
border-color: #666666;
background-color: #ffffff;
}
which is subsequently loaded in my Java main method. As you can see, I am trying to prevent any wrapping within the theaders/cells. Nevertheless, when an e-mail is generated and opened in outlook, some lines are wrapped and some are not. The wrapping is also idiotic, for instance a word International is wrapped as follows: Interantio|nal... Any idea what the problem might be?

try added a space at nowrap attribute, also there are some javascript based wrap functions available, check them out.

Related

How to click on toggle Full Screen button in a Map.My Map is similar to the link that i have added in the question

I have a Map where I need to click on the Toggle Full Screen button
What I have Tried:
I used the Actions Class to click on the Toggle button and is not working and have also used JavaScript Executor to click on the button but not happening .
Map Link - http://beta.findtoilet.dk/?term=2&lat=55.678937&lng=12.575738&zoom=15&maptype=roadmap
Below is my Script:
WebElement togglefullscreen = driver.findElement(By.xpath("//button[contains(#class,'gm-fullscreen-control')]"));
executor.executeScript("arguments[0].click();", togglefullscreen);
HTML:
<button draggable="false" aria-label="Toggle fullscreen view" title="Toggle fullscreen view" type="button" class="gm-control-active gm-fullscreen-control" style="background: none rgb(255, 255, 255); border: 0px; margin: 10px; padding: 0px; text-transform: none; appearance: none; position: absolute; cursor: pointer; user-select: none; border-radius: 2px; height: 40px; width: 40px; box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px; overflow: hidden; top: 0px; right: 0px;">
Outer HTML:
...
Loading...
Loading...Loading...
Can I get information on this
try this css :
button[title='Toggle fullscreen view']
also, ideally as you are saying, it's in a map, we may need to change the locator.

Spring, Thymeleaf with CSS how to color the errors

So, I have this:
<td th:if="${#fields.hasErrors('teacher.name')}" th:errors="*{teacher.name}">Name Error</td>
It works, it prints out the desired message on the screen, but how to color the messages in my style.css file? Which class to use? I've tried using th:errors, th:if, errors...
Also tried to name a class, eg.: <td class="validation-error" th:if="${#fields.hasErrors('teacher.name')}" th:errors="*{teacher.name}">Name Error</td> and then puting the validation-error in the style.css file, but nothing worked... I know it is a dumb question, but I lost my mind with it.
My style.css file looks like this:
input[type=text], textarea, select {
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
outline: none;
padding: 3px 0px 3px 3px;
margin: 5px 1px 3px 0px;
border: 1px solid #DDDDDD;
border-radius: 4px;
width: 400px;
}
input[type=text]:focus, textarea:focus, select:focus {
box-shadow: 0 0 5px rgba(81, 203, 238, 1);
border: 1px solid rgba(81, 203, 238, 1);
}
input[type=submit] {
background-color: dodgerblue;
border: none;
color: white;
padding: 10px 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 4px;
}
td[class=validation-error] {
color: red;
}
Did you remember to precede the classname with a fullstop?
ie:
.validation-error{..}
instead of
validation-error{..}
In CSS classes need to be preceded by a full stop (.) and IDs by a hashtag (#), only native elements can be selected with their name alone.
either give you td a class something similar to
<td class="error-list" th:if="${#fields.hasErrors('teacher.name')}" th:errors="*{teacher.name}">Name Error</td>
and add that class to your css file or style the td in the css file
td {
color: red;
}

In Gwt, the style which i added for the search bar got overlapped with the toolbar

For the Search action, i have used these styles in my ui.xml file:
.search {
border-right: none;
padding: 1px 5px;
width: 200px;
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
float:left;
}
.searchAction {
border: 1px solid #afafaf;
float:left;
}
with this, my search bar got overlapped with the toolbar.is there is some other styles i need to use ? i want to my search bar just below the tool bar.
For this, i have used margin style to have the search bar below the toolbar.
.margin {
margin-top: 30px;
margin-left: 5px;
margin-bottom: 10px;
}
And now its working fine.

CSS editing of textfields to speech bubble

I am creating my first chat program (with graphics in java) and i am using JavaFx Scene builder to create a GUI that contains of some pictures and then 1 - 2 men who can then chat with eachother.
the idea is that that when ever 1 of the clients that are connected to the server communicates with the other a small speech bubble will show.
My idea was to create this using a textfield that i would then edit in CSS so it will look like a speech-bubble.
how ever i have tried to look for the css style sheet to be able to configure my textfield but so far nothing has worked is anyone able to help me with this? so far the two style sheets ive tried are these:
.speech-bubble {
position:relative;
width: 320px;
padding: 10px;
margin: 3em;
background-color:#FFF;
color: #666;
font: normal 12px "Segoe UI", Arial, Sans-serif;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
border: 10px solid rgba(0,0,0,0.095);
}
.speech-bubble p {
font-size: 1.25em;
}
.speech-bubble:before,
.speech-bubble:after {
content: "\0020";
display:block;
position:absolute;
top:-20px; /* Offset top the height of the pointer's border-width */
left:20px;
z-index:2;
width: 0;
height: 0;
overflow:hidden;
border: solid 20px transparent;
border-top: 0;
border-bottom-color:#FFF;
}
.speech-bubble:before {
top:-30px; /* Offset of pointer border-width + bubble border-width */
z-index:1;
border-bottom-color:rgba(0,0,0,0.095);
}
.bubble{
background-color: #F2F2F2;
border-radius: 5px;
box-shadow: 0px 0px 6px #B2B2B2;
height: 200px;
margin: 20px;
width: 275px;
}
.bubble::after {
background-color: #F2F2F2;
box-shadow: -2px 2px 2px 0 rgba( 178, 178, 178, .4 );
content: "\00a0";
display: block;
height: 20px;
left: -10px;
position: relative;
top: 20px;
transform: rotate( 45deg );
width: 20px;
}
The problem is when i add this to my textfield it does not change apperance i dont know if i am doing it wrong or if these style sheets does not fit a textfield
Hope someone is able to help me thank you in advance:
This CSS looks like web CSS which is not supported as far as I know. Valid JavaFX css properties generally start with "-fx". There is a reference here:
http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html
Make sure you have the speech-bubble CSS class on your text field controls. Try adding changes one by one and checking the result in SceneBuilder. When I try and make too many changes at once one of them inevitably doesn't work.

value not coming properly from web services usin soap friends

I am getting the value from web service using soap but the value is in html tag format and some special characters are showing up. I am not getting the correct value
The actual value is:
BODY="&lt;span style=&quot;WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: none; -webkit-text-stroke-width:
0px&quot; class=&quot;Apple-style-span&quot;&gt;&lt;span
class=&quot;Apple-style-span&quot;&gt;
&lt;p style=&quot;LINE-HEIGHT: 11pt; MARGIN: 0cm 0cm 11pt&quot; class=&quot;MsoNormal&quot;&gt;Sage may not have set investors&amp;#8217; collective pulse racing in the past, but we believe that the market is missing a trick on this solid growth and potential takeout story. Not only are there revenue and margin opportunities in emerging/&lt;?xml:namespace prefix = st1 /&gt;&lt;st1:country-region w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;US&lt;/st1:place&gt;&lt;/st1:country-region&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;healthcare markets, the stock also looks very attractive on the Quest&amp;#8482; LBO framework. With 28% upside to our&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.csquest.com/QUEST?clpg=ART&amp;amp;id=1092&amp;amp;clid=&amp;amp;pg=SEN&amp;amp;spl=&amp;amp;cid=0802165&quot;&gt;adjusted Quest&amp;#8482; per share of 326p&lt;/a&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;and upgrades likely to come through post the October numbers, Sage is certainly worth a look.&lt;/p&gt; &lt;p style=&quot;LINE-HEIGHT: 11pt; MARGIN: 0cm 0cm 11pt&quot; class=&quot;MsoNormal&quot;&gt;The company&amp;#8217;s longevity (two decades), huge customer base, strong distribution capabilities/customer support model, internationally recognised brands and highly cash generative business (with 65% subscription revenue) makes it an ideal candidate for M&amp;amp;A. And the business continues to grow. There are plenty of opportunities in emerging markets (where Sage&amp;#8217;s presence is small), and then there&amp;#8217;s the high-growth US healthcare market where Sage is well positioned due to its industry-accredited products and focus on the move towards web and mobile technologies. Yet, we believe there&amp;#8217;s nothing in the share price to reflect all these attractive M&amp;amp;A characteristics.&lt;/p&gt;
&lt;p style=&quot;LINE-HEIGHT: 11pt; MARGIN: 0cm 0cm 11pt&quot; class=&quot;MsoNormal&quot;&gt;On Quest&amp;#8482; the stock looks marginally expensive, but as the&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.csquest.com/QUEST?clpg=ART&amp;amp;id=&amp;amp;clid=&amp;amp;pg=VAL&amp;amp;spl=&amp;amp;cid=0802165&quot;&gt;Valuation page&lt;/a&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;shows, Sage has normally traded at a premium to the default value per share. Today&amp;#8217;s 14&lt;b&gt;%&lt;/b&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;downside is, in historic terms, at the bottom of the range (&lt;a href=&quot;http://www.csquest.com/QUEST?clpg=ART&amp;amp;id=197&amp;amp;clid=&amp;amp;pg=CHR&amp;amp;spl=&amp;amp;cid=0802165&quot;&gt;Charting page&lt;/a&gt;). However, given the company&amp;#8217;s demonstrable ability to beat the returns fade (impressive CFROA performance), we believe it&amp;#8217;s appropriate to delay the returns fade for two years &amp;#8211; generating an adjusted Quest&amp;#8482; value per share of 326p&lt;b&gt;&lt;/b&gt;&lt;span&gt;(28% upside to Friday&amp;#8217;s close).&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;LINE-HEIGHT: 11pt; MARGIN: 0cm 0cm 11pt&quot; class=&quot;MsoNormal&quot;&gt;Given it&amp;#8217;s attractiveness to potential bidders (helped by an LBO FCF yield of 11%), we&amp;#8217;ve run Sage through the Quest&amp;#8482; LBO model. At a 25% bid premium (319p), assuming 50/50 debt/equity and at &amp;#8216;normal&amp;#8217; trading multiple, Quest&amp;#8482; sees a healthy three-year IRR of 25%. The &amp;#8216;normal&amp;#8217; valuation excludes both the valuation highs of the TMT bubble and the lows of the recession. As shown in Figure 1, the IRR&amp;#8217;s key sensitivity is the exit multiple. At the current depressed multiple (8.4x EV/EBITDA; 2.3x EV/sales; 12.5x P/E), IRR falls to a mere 4%.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://10.113.73.61/QUEST?PCF=MOBILE&amp;amp;clpg=ARTICLE&amp;amp;pg=SUM&amp;amp;cid=0802165&quot;&gt;http://10.113.73.61/QUEST?PCF=MOBILE&amp;amp;clpg=ARTICLE&amp;amp;pg=SUM&amp;amp;cid=0802165&lt;/a&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;" IS_PROTECTED="0" PDF_NAME="" REFERENCE_CITN_ARTICLE_ID="23220" ISNEWARTICLE="1" HYPERLINK="/PATH/23220.pdf"><SUMMARY>Sage may not have set investors’ collective pulse racing in the past, but we believe that the market is missing a trick on this solid growth.
Under-appreciated LBO candidate. Buy.</SUMMARY><AUTHORS/></ARTICLE><ASSOCIATED_COMPANIES ARTICLE_ID="23220"><COMPANY ID="1724" SHRT_NAME="Sage" NAME="Sage Group (The) PLC" SHARE_PRICE="242.0" ADJ_QUEST_VAL="45.0" CURRENCY="p " ARTICLE_COMPANY_ORDER="1" ARTICLE_COMPANY_TYPE="ICV"/></ASSOCIATED_COMPANIES><COMPANIES_WITH_AUTH context="COMPANIES"><COMPANY NAME="Sage"/></COMPANIES_WITH_AUTH></ROOT>
</getDataResult></getDataResponse></soap:Body></soap:Envelope
>
The value I get is:
BODY="&lt;p&gt;&lt;span style=&quot;WIDOWS: 2; TEXT-TRANSFORM: \
none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal;
ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px;
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: none; -webkit-text-stroke-width:
0px&quot; class=&quot;Apple-style-span&quot;&gt;&lt;span
class=&quot;Apple-style-span&quot;&gt;&lt;font style=&quot;FONT-FAMILY: Verdana; FONT-SIZE: 12px&quot; class=&quot;TFTFont&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;MARGIN-LEFT: 36pt&quot;
class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: black; FONT-SIZE: 10pt&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span class=&quot;230512107-01062007&quot;&gt;&lt;font color=&quot;#000000&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; FONT-SIZE: 10pt&quot; lang=&quot;EN-US&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span style=&quot;FONT-FAMILY: 'Wingdings 2'; COLOR: rgb(212,46,18); FONT-SIZE: 12pt&quot;&gt;&amp;#161;&lt;span class=&quot;480350618-03012007&quot;&gt;&lt;strong&gt;&lt;font color=&quot;#000000&quot; size=&quot;2&quot; face=&quot;Arial&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial; COLOR: gray; FONT-SIZE: 7pt&quot;&gt;&lt;font face=&quot;Arial&quot;&gt;&a
Sounds like you need to talk to the web service provider. Either that, or you have somehow mansged to request a html formatted response rather than a soap response.

Categories

Resources