MyBB Community Forums

Full Version: Tried to replace font icons with the close.png in . close modal but it didn't work !
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I tried to replace the font icons instead of using default close.png in modal close button.

i tried this css.

.jquery-modal .modal {
  max-width: 500px;
  width: 100%;
  text-align: left;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  z-index: 2;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  -o-border-radius: 8px;
  -ms-border-radius: 8px;
  border-radius: 8px;
}

.modal a.close-modal:before{
  font-family: 'Font Awesome 5 Free';
  content: '\f00d';
  font-size: 20px;
  color: #fff;
  left: 10px;
  position: relative;
  top: 5px;
}

.modal a.close-modal {
  position: absolute;
  top: -12.5px;
  right: -12.5px;
  display: block;
  width: 40px;
  height: 40px;
  font-size:0px;
  box-shadow: 0 3px 3px 0 rgb(0 0 0 / 14%), 0 1px 7px 0 rgb(0 0 0 / 12%), 0 3px 1px -1px rgb(0 0 0 / 20%);
  background: #516a75;
  border-radius: 50%;
}

i don't understand , it seems i wrote the correct css , but then it's doesn't working why ?

did I mistake somewhere ?
(2021-09-03, 03:01 AM)PARADOXP Wrote: [ -> ]I tried to replace the font icons instead of using default close.png in modal close button.

i tried this css.

.jquery-modal .modal {
  max-width: 500px;
  width: 100%;
  text-align: left;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  z-index: 2;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  -o-border-radius: 8px;
  -ms-border-radius: 8px;
  border-radius: 8px;
}

.modal a.close-modal:before{
  font-family: 'Font Awesome 5 Free';
  content: '\f00d';
  font-size: 20px;
  color: #fff;
  left: 10px;
  position: relative;
  top: 5px;
}

.modal a.close-modal {
  position: absolute;
  top: -12.5px;
  right: -12.5px;
  display: block;
  width: 40px;
  height: 40px;
  font-size:0px;
  box-shadow: 0 3px 3px 0 rgb(0 0 0 / 14%), 0 1px 7px 0 rgb(0 0 0 / 12%), 0 3px 1px -1px rgb(0 0 0 / 20%);
  background: #516a75;
  border-radius: 50%;
}

i don't understand , it seems i wrote the correct css , but then it's doesn't working why ?

did I mistake somewhere ?

if the css is correct like you said, did you do a hard refresh?
yes i checked , what i saw only the background of .modal a.close-modal class . It seems the before class of it's isn't working.

solved , i forget to remove the text-indent property .

weird behaviour of css i never thought about it.

after reset text-indet: -9999px; to text-indent: 0 ,

if i am clicking the myalert notification button repeatedly 3,4 times then a modal that uncloseable appears on footer. if i click the close modal class , it happens nothing , the modal remains unclosed.

but the strange thing is if reset the text-indent property to default value -9999px everything works fine but as before the in close modal , in it's :before pesudo the content: "\f00d" not working .

After some testing what i got , it's happening only in "MyAlerts" modal. I think there is some bug in MyAlers