css – Why should “cancel” and “confirm” button have the same size?

Cancel and Confirm typically just happen to have same size buttons. There’s really no UX principle supporting same size primary and secondary buttons

In fact, a larger confirm button is preferred to emphasize the primary action. This is why a lot of cancel and undo actions on the web are styled as a link (e.g. UX.SE’s post answer form) to give the primary action more weight.

You can read more about visual weight from the article referenced by @DasBesto https://uxmag.com/articles/visual-balance-and-weight-allocation-for-usability

Then why are cancel and confirm buttons usually the same size?

  1. The word “Cancel” and “Confirm” have very similar length.

Buttons length by default are determined by the length of its content. Since Cancel and Confirm are very similar in length, you get similar size buttons.

  1. Buttons on touch screen needs to be large.

On a mobile device, you need large tappable buttons. With a modal, to facilitate tapping, you make the buttons span the entire width. Cancel and Confirm are made the same size as a compromise to ensure both buttons are easy to tap on. This is okay because color also provides strong visual weight. As long as your Confirm button color make it stand out from your Cancel button, having the two button be the same size isn’t that big a deal.

html – Is it possible to copy text from a webpage and retain the fonts in the CSS?

When a user copies the text he/she is not able to copy it with font and style.

font and style is not added to the text copied on clipboard.

<div class="box"> <p class="textstyle" id="FasterOne" > HELLO GUYZ</p> </div>

CSS I have imported font from Google:

#FasterOne{ font-family: 'Faster One',cursive; }

Now I want that if a user selects this paragraph he/she could use it with its font.

Sharepoint Online | How To Properly Call Javascript and CSS files within an ASPX page?

Sorry if this could already have been answered but I am new to Sharepoint Online.

With previous versions of Sharepoint, this has been working fine for me until now.

  1. Upload an HTML, CSS and JS files within any document repository in Sharepoint
  2. Call the CSS and JS files using traditional src=”https://sharepoint.stackexchange.com/RelativePathToTheCSSandJSFiles”

With Sharepoint online, this seems to no longer work. For testing purposes, what I do now is this:

  1. Upload .ASPX file within the default Document folder of a site collection I created
  2. Upload the CSS and JS files within the default Style Library Folder

enter image description here

  1. Called the CSS file using the following script

enter image description here

  1. Called the JS file using the following script

enter image description here

Am I doing this the right way? Please help.

css3 – Switching between alternate CSS stylesheets – what are all the available settings?

What are all the available settings for stylesheet <link> elements?

When deploying CSS stylesheet <link> elements, what are all the available settings?

A persistent stylesheet looks like this:

<link rel="stylesheet" href="https://webmasters.stackexchange.com/my-stylesheet.css" />

I think the following settings are correct:

  1. including a title makes the stylesheet preferred
  2. including a title and rel="alternate stylesheet" makes the stylesheet alternate
  3. any stylesheet with a title is combined (turned on/off) with all others with the same title
  4. any stylesheet with a media attribute is media-specific and only applies when the media query condition is satisfied

I suspect there may be other settings I have missed out, alongside:

  • persistent
  • preferred
  • alternate
  • combined
  • media-specific

What are all the available settings for stylesheet <link> elements?

html – How to make this div element the size of the img contained within it? [css]

I am attempting to create a tooltip, to appear when hovering on an image within a table.
However when I add the div to put a container for the tooltip, it adds extra spacing to my table, as seen in the first row (not applied to subsequent rows).

Why is the div 118 x 66 size as shown instead of the size of the image within it (59×59
)? It creates unnecessary spacing.

Oversized horitionzal dimension


CSS for tooltip

Tooltip in action

CSS: Appearance/Customise display different to actual display

I use the Shared Counts plugin for displaying social media buttons on my blog.

I’m using a shortcode to display some buttons in a footer text widget on my homepage. When I format the way they look in Appearance/Customise/Simple CSS I can get what I’m looking for. However, for some reason, when I look at the page outside of the customiser the display is not the same (the buttons are all squashed together with no spacing).

Specifically, I’m looking to space the buttons evenly using:

      .shared-counts-wrap  {
       display: flex;
       justify-content: space-between;

If it helps to visualise the problem, the page is here: https://richiesroom.com/

Any suggestions?

Thank you.

8 – CKEditor strips all inline CSS and some tokens

I’m trying to add a color and font size to some text using the CKEditor. As soon as I save it these are stripped out.
I’ve also noticed some tokens are stripped down when certain settings are enabled.

I went to add a bit of text in a different font and color but when I saved it and viewed the text the spans were stripped of their “style” tag.
I went to config/content/formats/manage and enabled Limit allowed HTML and added span to the list like so :

<a hreflang href> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol type start> <li> 
<dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt data-entity-type data-entity-uuid> 
<u> <s> <p> <h1> <pre> <table> <caption> <tbody> <thead> <tfoot> <th> <td> <tr> <span style>

After saving this all the attributes inside of span are still stripped. I also noticed that many of the tokens I was using (such as site:url) are broken and only half of it remains.

I went back and disabled the Limit allowed HTML option and then when I saved the text the styles and token would save properly.
When viewing the text in an email, the tokens had worked just fine but the span had it’s css striped.

I’ve tried looking for an answer but most are saying I need to enable and add the span to the limit html option but this definitely does not work for me.

There is also Correct faulty HTML enabled, would that be a problem for this?
How can I enable in line styling with the CKEditor?

Mover un elemento dentro de un menu SOLO CON CSS

Tengo el siguiente menú.

<div class="mo-logo">
    <a href="http://localhost/travellia">
        <img class="logo" src="https://localhost/logoTravellia.jpg" alt="Logo"> </a>

<ul id="menu-travellia" class="text-right">
    <li id="menu-item-48" class="menu-item-48"><a href="#">Inicio</a></li>
    <li id="menu-item-49" class="menu-item-49"><a href="#">Cruceros</a></li>
    <li id="menu-item-50" class="menu-item-50"><a href="#">Destinos</a></li>
    <li id="menu-item-51" class="menu-item-51"><a href="#">Tours</a></li>
    <li id="menu-item-52" class="menu-item-52"><a href="#">Ofertas</a></li>
    <li id="menu-item-53" class="menu-item-53"><a href="#">Contáctanos</a></li>

Como puedo mover el que contiene la imagen entre “Destinos” y “Tours”, SOLO usando CSS.
O alguna sugerencia para mover la imagen, en el centro de los elementos de ul.

Magento2.3.2 js and css not getting applied on frontend

I have a site in magento 2.3.2.
My code is getting fetched from var/view_processed instead of directly from app/code and app/design. See https://prnt.sc/slkvss
The css and css also not getting applied properly. Refer this link of my site https://wazoodl2.wsisites.net
What is the issue. I ran all the commands multiple time, still no affect.

html – Efeito CSS Transition no Link – Pseudo Active

Como posso deixar o efeito de transição fixo utilizando a pseudo de classe “active” a:active{…}, ou seja, quando o link foi clicado (ativado) o efeito permanece. Exemplo abaixo:


  margin: 0;
  padding: 0;
  font-family: arial; sans-serif;
  font-size: 14px;
  background: #333;
  float: left;
  margin: 20px;
  padding: 20px 30px;
a {
  position: relative;
  color: #fff;
  text-decoration: none;  

a:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  bottom: 0;
  left: 0;
  background-color: #fff;
  visibility: hidden;
  -webkit-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transition: all 0.3s ease-in-out 0s;
  transition: all 0.3s ease-in-out 0s;

a:hover:before {
  visibility: visible;
  -webkit-transform: scaleX(1);
  transform: scaleX(1);


  <a href="#">
    Passe o Mouse