I have a Transactional Template in my SendGrid Account, and I learned how to use it here, basically, any html tag that I want to change I do this :
msg.SetTemplateId("0000000-00000-00000-0000-0000000");
msg.AddSubstitution("-name-", "Example User");
msg.AddSubstitution("-city-", "Denver");
The problem is, if I had to put a link inside of a Button how I would do this. ?
<a href="http://www.MyCustomLink.com/"><button style="color:#607D8B; background-
color: white;
border: none;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
padding: 15px 32px;"
type="button">Confirm Account</button>
You should be able to simply set the href's value to a substitution key.
For example:
<a href="-accountConfirmationLink-">
<button>Confirm Account</button>
</a>
can then be replaced with
msg.AddSubstitution("-accountConfirmationLink-", "https://stackoverflow.com");
Related
anyone seen any issues where razor code you write isn't given an isolation name which causes its isolated css to not be able to find it?
<!--_Layout.cshtml-->
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index"><img src="~/img/Dimensions360_Logo_192x113.png" /></a>
/*_Layout.cshtml.css*/
a.navbar-brand > img {
height: 75px;
float: left;
margin-left: 15px;
margin-top: 2px;
}
and the generated html is not putting the b-u43b921rpo isolation name on my img
yet the generated css does include that name
a.navbar-brand > img[b-u43b921rpo] {
height: 75px;
float: left;
margin-left: 15px;
margin-top: 2px;
}
I see now this is by design:
Scoped CSS only applies to HTML elements and not to Razor components or Tag Helpers, including elements with a Tag Helper applied, such as .
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/css-isolation?view=aspnetcore-6.0
With latest update of chrome background-image not showing in chrome browser .Where as working fine with Fire Fox and IE.Before Chrome update it worked well .
.headersearchbutton {
float: right;
text-indent: -999em;
margin-right: 20px;
margin-top: 2px;
border: 0px;
background: transparent;
background-image: url(../images/internal-submit-sprite.gif);
background-repeat: no-repeat;
background-position: 0px 0px;
width: 16px;
height: 16px;
float: right;
cursor: pointer;
}
Tried with some google solutions but didn't worked .
First and foremost; I know that a lot of these CSS-type questions have been closed, so, hopefully I've been able to broaden the question to fit others aswell. Here goes:
I've been handed a project and am doing my best with adding the features my boss wants me to. But when I try to style a button differently from the rest, the changes don't "take".
The css file works as I am able to style other things:
<link href="~/Content/Site.css" rel="stylesheet" type="text/css" />
Button:
<input type="submit" value="Print." class="fakeBtn" id="fakeBtn" />
CSS tries:
.fakeBtn
{
font-size: 0.8em;
border: 0px;
background-color: transparent;
color: #999;
cursor: hand;
}
input#fakeBtn
{
font-size: 0.8em;
border: 0px;
background-color: transparent;
color: #999;
cursor: hand;
}
As you can see I've tried using a class to change the style and also the id approach. None of which works though.
I've hardly done any mvc work and this, already existing, project is my first. Is it a logical error? What am I doing wrong?
EDIT:
Could any of these be overriding? These are all the css-snippets I could find with "input" in them. How does one know if something overrides something else?
input, textarea {
border: 1px solid #e2e2e2;
background: #fff;
color: #333;
font-size: 1.2em;
margin: 5px 0 6px 0;
padding: 5px;
width: 300px;
}
input:focus, textarea:focus {
border: 1px solid #7ac0da;
}
input[type="checkbox"] {
background: transparent;
border: inherit;
width: auto;
}
input[type="submit"],
input[type="button"],
button {
background-color: #d3dce0;
border: 1px solid #787878;
cursor: pointer;
font-size: 1.2em;
font-weight: 600;
padding: 7px;
margin-right: 8px;
width: auto;
}
td input[type="submit"],
td input[type="button"],
td button {
font-size: 1em;
padding: 4px;
margin-right: 4px;
}
input.input-validation-error {
border: 1px solid #e80c4d;
}
input[type="checkbox"].input-validation-error {
border: 0 none;
}
If this is pure html, then your code seems fine, and it is clear that either your css is simply not being loaded and read, or it is being overwritten at some later stage.
You could try applying important (like color: #999 ! important;), just to see if any of the changes become visible then. If so, you know that the CSS properties are being overwritten somewhere else.
On the other hand, I've seen Asp.Net and MVC caching cause some problems here. You might want to try deleting the site and publishing again from scratch, to see if there are any changes.
Update:
I believe this might be your problem:
input, textarea {
border: 1px solid #e2e2e2;
background: #fff;
color: #333;
font-size: 1.2em;
margin: 5px 0 6px 0;
padding: 5px;
width: 300px;
}
This specifies style for the type input, so if this comes after .fakeBtn { ...}, then that style will be applied instead (unless ofcourse, you have added ! important; to the end of some of the statements, in which case they will only be overridden by other statements which also contain ! important;).
Your best solution is probably to add specific classes to the section: input, textarea { ...}. That way, it will not override other input-fields in general.
CSS seems fine.
Try using Firebug to verify what styles are applied and what are overridden.
I suspect you have some other CSS rules that style the buttons and override your CSS.
Getting the error from the title when attempting to click on an <a> tag in a regression test script. I've researched the issue here: Selenium::WebDriver::Error::MoveTargetOutOfBoundsError: Element cannot be scrolled into view:[object HTMLSpanElement] and here as well: https://groups.google.com/forum/#!msg/webdriver/R2jwSWrIK44/RaCLRPlKIWEJ but I don't understand the root cause of the issue.
I've tried using By.jQuery, By.Id, By.Css, By.Xpath, as well as selecting by index and always get the same error. Here's the relevant code:
HTML:
<div id="divTabs">
<a id="tabECheck" target="#divECheck">eCheck</a>
<a id="tabAceComments" target="#divAceComments">Ace Comments</a>
<a id="tabReviewComments" target="#divReviewComments">Review Comments</a>
<a id="tabReviewHistory" target="#divReviewHistory">Review History</a>
</div>
CSS:
#divTabs{
writing-mode: tb-rl;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
position: absolute;
width: 27px;
padding: 0px;
height: auto;
display: table-row;
margin-bottom: 10px;
}
#divTabs a
{
border: 1px solid #CCC;
padding: 3px;
white-space: nowrap;
cursor: pointer;
color: #3966BF;
display: table-cell;
background-color: #FFF;
}
C#:
element = driver.FindElement(By.Id("tabReviewComments"));
element.Click();
As you can see, I'm trying to click on the 3rd <a> tag with the id of "tabReviewComments." However, if I have the script click on the first <a> tag with the id of "tabECheck", it works in the sense that I don't get the "can't scroll element into view" error, the element is clicked, and the script moves on past that line. Sadly, I need to click on that third <a> tag. Any ideas short of moving the <a id="tabReviewComments" target="#divReviewComments">Review Comments</a> to the top?
Thanks!
Its likely that the element is actually un-clickable as far as the browser goes, this may be because
Its position is off-screen (negative space)
Its behind another element (like modal overlay or something)
It has 0 size (sometimes css can be funny, browser maybe calculating size differetnlty to what your seeing)
A UI bug in your system whereby the element isn't visible for another reason
I have a 1000px wide div, which contains a menu control. Inside this menu, I have 5 items (links). I want to use whole length of line, so in css file is wide of every item set to 200px.
.level1
{
border-width: 0px;
margin: 0px;
padding: 0px;
background-color: #99FF66;
font-family: Arial, Helvetica, sans-serif;
color: #FF0000;
height: 20px;
font-size: 12px;
line-height: 20px;
text-align: center;
width: 200px;
}
However, when page is loaded, I get two rows, because the last item doesn't fit.
See, that inserted black line is 200px wide (and the link "vzkazy" is longer). So the question is: Why is the MenuItem wider ? And how to set it's wide to 200px ? Thanks.
in your code at jsFiddle you applied your level1 class to ul and all anchor tags so i think you need not to applied same style to your ul tag you can do somethiong: ul.level1 li{ here your code }