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: inline
Hide element in CSS with Display and Visibility
visibility: hidden (Hide but keep the space) <div stlye=”visibility: hidden;”>The Components We want to Hide</div> By default, the value of the visibility property is visible. However, if you want to make an image invisible, you can set the value of visibility to hidden. display: none (Hide and remove the space) <div stlye=”display: none;”>The Components We want to Hide</div> The display […]
How to use ? : if statements with Asp.Net Razor
<span class=”btn btn-@(item.Value == 1 ? “primary” : item.Value == 2 ? “warning” : “danger”)”>EVALUATE</span> Briefly, we can say that @(condition ? “the value, if the condition is true” : “the value, if the condition is false” )