The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HTML to center and open in new window
magnus1
post Mar 12 2019, 05:47 PM
Post #1





Group: Members
Posts: 6
Joined: 20-November 16
Member No.: 24,935



Hi,

Can someone please alter this code so it centers the "book call" text and opens the link in a new window? Thank you so much!
<form>
<input style="width: 300px; padding: 20px; cursor: pointer; background: #0071bd; color: #ffff; border-radius: 10px; border: 1px solid #999; font-size: 150%;" type="button" value="BOOK CALL" onclick="window.location.href='https://m.me/1673844402720379?ref=w5135092'" />
</form>

Michelle
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 12 2019, 08:19 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Center the text on the button or center the button on the page?
http://www.w3.org/Style/Examples/007/center.html

To open a new window you need window.open(), not location.href .
https://developer.mozilla.org/en-US/docs/Web/API/Window/open
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
magnus1
post Mar 12 2019, 10:18 PM
Post #3





Group: Members
Posts: 6
Joined: 20-November 16
Member No.: 24,935



QUOTE(pandy @ Mar 12 2019, 08:19 PM) *

Center the text on the button or center the button on the page?
http://www.w3.org/Style/Examples/007/center.html

To open a new window you need window.open(), not location.href .
https://developer.mozilla.org/en-US/docs/Web/API/Window/open


Thanks so much for replying! smile.gif

Yep, within the button. So how do I incorporate this new html into my current code? I barely touch html if I can help it! Scares me!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th April 2024 - 12:46 PM