Unable to change border color of a div

Unable to change border color of a div

Questions : Unable to change border color of a div

448

Could anybody help why am not able to change in4codes_html the border color from blue(by alert-info) in4codes_html to $f0f0f0 ?

 <div class="alert alert-info" role="alert" border="2px solid #f0f0f0 ></div> 

Total Answers 3
28

Answers 1 : of Unable to change border color of a div

Your code is not clear here but I will in4codes_html try to answer from what i can get.

 <div class="alert alert-info" role="alert" style="border:2px solid #f0f0f0!important" ></div>

Try adding the border attribute in style in4codes_html tag and adding !important to the end.

0

2

Answers 2 : of Unable to change border color of a div

may be you inherit the parent css in in4codes_html your file

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"/> <div class="alert alert-info" style="border:5px solid #f0f0f0;" role="alert"> This is a info alert—check it out! </div>

0

1

Answers 3 : of Unable to change border color of a div

Apply border-color and border style in4codes_html property this would allow to set the in4codes_html color for the borders.I have provided a in4codes_html sample HTML code for your reference else in4codes_html add

HTML code

<!DOCTYPE html> <html> <head> <style> h1 { border-style: solid; border-color: coral; } div { border-style: solid; border-color: coral; } </style> </head> <body> <h1>hello</h1> <div>World</div> </body> </html>

0