How can I code a text box for product info?

Solved

How can I code a text box for product info?

TrendBlend
Trailblazer
338 0 34

Hello can anyone help me with this? I want to box this tekst. Code is currently this:

var form = document.querySelector('product-info .no-js-hidden');

var discount = document.createElement('div');
discount.className = 'dis-count shopify-payment-button';
discount.innerText = 'Buy 2 get 10% additional discount on both!';
discount.style.marginTop = "10px";
form.appendChild(discount);

but I cant find how to box the tekst anywhere.

Accepted Solution (1)
PaulMartin
Shopify Partner
624 60 147

This is an accepted solution.

Ah okayy, gotchu. You can add borders. border - CSS: Cascading Style Sheets | MDN (mozilla.org)

contact@paulmartinlopez.com
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ

View solution in original post

Replies 4 (4)

PaulMartin
Shopify Partner
624 60 147

What do you mean by "box" this tekst? Display it in your page or add some border to it?

contact@paulmartinlopez.com
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ
TrendBlend
Trailblazer
338 0 34

I want to like put lines around the tekst that form a box so the text stands out from any other tekst

PaulMartin
Shopify Partner
624 60 147

This is an accepted solution.

Ah okayy, gotchu. You can add borders. border - CSS: Cascading Style Sheets | MDN (mozilla.org)

contact@paulmartinlopez.com
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ
TrendBlend
Trailblazer
338 0 34

Yeah thats it thanks