Let’s say we have 3 buttons and we want to show them on the same line: #outer { width:100%; text-align: center; } .inner { display: inline-block; } <div id=”outer”> <div class=”inner”><button type=”submit” class=”msgBtn” onClick=”return false;” >Save</button></div> <div class=”inner”><button type=”submit” class=”msgBtn2″ onClick=”return false;”>Publish</button></div> <div class=”inner”><button class=”msgBtnBack”>Back</button></div> </div>
Tag: html
How to use client-side function on checkbox or any asp.net component
Here is the Asp part: <label for=”chkCondition”> <asp:CheckBox ID=”chkCondition” Text=”Should i show the div?” runat=”server” onclick=”ShowHideDiv(this)” /> </label> <hr /> <div id=”divToShowOrHide” style=”display: none”> this div will be shown regarding the checkbox checked status. <asp:TextBox ID=”myTextBox” runat=”server” /> </div> And here is the Javascript part: <script type=”text/javascript”> function ShowHideDiv(chkCondition) { var divToShowOrHide = document.getElementById(“divToShowOrHide”); divToShowOrHide.style.display […]
How to apply two classes to a single element in CSS
Let’s say you want to use 2 or more classes for a div. Then you should use these classes inside the class attribute, separated by whitespace: <div class=”myFirstClass mySecondClass”></div> To target elements that contain all of the specified classes, use this CSS selector (no space) in your CSS file: .myFirstClass.mySecondClass {}
How to put text inside MVC Razor code block
The contents of a code block ({ … }) are expected to be code or markup (tags), not plain text. If you want to put text directly in a code block, you have three choices: Wrap it in any HTML tag Wrap it in the special Razor <text> tag, which will just render the text without the […]
How to render HTML tags Asp.Net MVC
string myValue = “<b>Hello</b>”; @Html.Raw(HttpUtility.HtmlDecode(myValue))
Creating Multiline textbox using Html.Helper function in Asp.Net MVC
@Html.TextArea(“Body”, null, new { cols = “55”, rows = “10” }) or
Navigate to a Div using a button in HTML
The Div: <div id=”DivToNavigate”> The content goes here… </div>
How to make some specific word(s) Bold or Underline in ReportViewer
Click into the text box (so your cursor is in the text box) Right Click and select “CREATE PLACEHOLDER” In Markup Type select “HTML – Interpret HTML tags as styles” In Value: Bold: =”This is a <b>Queue</b> Builder” Underline: =”This is a <u>Queue</u> Builder”
How to send e-mail in HTML View with wp_mail()
$to = ‘a1@b.com, a2@b.com, a3@b.com’; $subject = ‘The Subject of your e-mail’; $message = ‘The Content of your e-mail’; $headers = array(‘Content-Type: text/html; charset=UTF-8’); wp_mail( $to, $subject, $message, $headers );
Get and Use TextBox Values with Javascript
Here is the example code to get and use TextBox Values with Javascript: