0

I want to create a container/palette(I don't know really what to call it) for som of my buttons in my webpage to put them into it and change their background color and some other effects.

You can see what I mean in the following picture where there are 3 buttons(Question, Action, Output) in left bar of the page:

enter image description here

Hasani
  • 3,543
  • 14
  • 65
  • 125

2 Answers2

1

You can put the buttons in a tag (the parent tag), and apply some style to the parent, like:

.button-box {
 height: 100vh;
 background: #3a8484;
 width: 10vw;
 padding: 10px;
 border-radius: 3px;
}

button {
 background-color: rgb(2, 70, 70);
 border-radius: 10px;
 padding: 5px;
 color: #fff;
 border: 1px solid rgb(2, 70, 70);
 width: 100%;
 display: block;
 margin-bottom: 5px;
}
<div class="button-box">
   <button>Question</button>
   <button>Action</button>
   <button>Output</button>
</div>
Prashant Pimpale
  • 10,349
  • 9
  • 44
  • 84
ro.sadeghi
  • 26
  • 3
0
did you mean that you want to apply some style to each button(Question, Action, Output)?

<button>Question</button>
<button>Action</button>
<button>Output</button>

button{
    background-color: rgb(2, 70, 70);
    border-radius: 10px;
    padding: 5px;
    color: #fff;
    border: 1px solid rgb(2, 70, 70);
    width: 10%;
  }
ro.sadeghi
  • 26
  • 3