Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how duplicate a class for creating buttons ?

Featured Replies

I have attempted unsucessfully to duplicate a class responsible for formatting links turning them into buttons.
Below I pasted the html and css original codes:

 

 

ORIGINAL CODE

html code

 

<footer id="footer" class="anything">

<ul>
<li><a class="btn btn-default" href="#">whatever</a></li>
..............

 

 

main .css

 

. ...............

................

.................

 

/* .btn original */

.btn-primary {
padding: 8px 20px;
background: #f86410;
color: #fff;
border-radius: 4px;
border:none;
margin-top: 10px;
}
.btn-primary:hover,
.btn-primary:focus{
background: #f86410;
outline: none;
box-shadow: none;
}
.btn-transparent {
border: 3px solid #fff;
background: transparent;
color: #fff;
}
.btn-transparent:hover {
/*border-color: rgba(255, 255, 255, 0.5);*/
border-color: rgba(0, 0, 0, 0.5);
}
/* /// .btn original */

 

 

 

 

Now I will paste my tentative code :

 

 

 

 

CHANGED CODE

html code

 

<footer............

<ul>
<li><a class="btn2 btn-default" href="#">whatever</a></li>

 

 

/* .btn2 */

.btn2-primary {
padding: 8px 20px;
background: #f86410;
color: #ffcc00;
border-radius: 4px;
border:none;
margin-top: 10px;
}
.btn2-primary:hover,
.btn2-primary:focus{
background: #f86410;
outline: none;
box-shadow: none;
}
.btn2-transparent {
border: 3px solid #fff;
background: transparent;
color: #fff;
}
.btn2-transparent:hover {
/*border-color: rgba(255, 255, 255, 0.5);*/
border-color: rgba(0, 0, 0, 0.5);
}
/* /// .btn original */

 

 

I thought it was going to work but it is not what happened (only a rectangular background )

Would you please provide me some guidance on what is wrong ; Thank you so much.

Edited by ronwolpa

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.