LAS
LAS

Reputation: 179

Using css to remove background

This the html code to create the button

  <div class="delete-style">
    <button type="button">DELETE</button>
  </div>

and am using this css code to remove the border surrounding the text in the button

.delete-style {
    background-color: red;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-block;
    outline: None;
    overflow: hidden;
}

result

Upvotes: 0

Views: 174

Answers (3)

Pavan Kumar Velpula
Pavan Kumar Velpula

Reputation: 21

You are trying to style the div, not button. declare class to the button, it will work.

<div>
    <button type="button" class="delete-style">DELETE</button>
  </div>

Upvotes: 1

PDSSandeep
PDSSandeep

Reputation: 189

This will help you .delete-style button{border:0;}

Upvotes: 0

Md Johirul Islam
Md Johirul Islam

Reputation: 5162

To remove border around the button you can add border : None; style to your button

.delete-style {
    background-color: red;
    padding: 10px 20px;
    text-decoration: none;
    display: inline-block;
    outline: None;
    overflow: hidden;
}
.delete-style button {
 border: None;
}
  <div class="delete-style">
    <button type="button">DELETE</button>
  </div>

Upvotes: 1

Related Questions