0

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

2
  • 4
    You are styling the div, not the button itself- those are basics Commented May 23, 2018 at 16:56
  • if you want to style the button, use .delete-style button { Commented May 23, 2018 at 16:57

3 Answers 3

1

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>

Sign up to request clarification or add additional context in comments.

Comments

1

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>

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.