(#12930) HTML IN modernbb

Page 2 of 2 Previous  1, 2

Go down

In progress (#12930) HTML IN modernbb

Post by Miau on June 29th 2018, 5:01 am

First topic message reminder :

I need help, I created an alert message in html, but when I changed the version it became so

Code used: Mr. Green

<table style="border-left-width: 3px; border-left-style: solid; border-left-color: #23E605; border-right-width: 3px; border-right-style: solid; border-right-color: #23E605; margin: 10px auto; padding: 5px; border-radius: 4px; box-shadow: #FF0000 0px 5px 9px; max-height: 2500px; max-width: 2500px; z-index: 999; min-width: 1px; min-height: 1px; background: url("http://bit.ly/acLmW9");"><tbody><tr><td><img src="https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Warning.png" alt=""></td><td><strong><font color="red" size="1">A sua <u>Barra de Alerta</u> aumentou em <i><font color="BLUE">10%</i></font> por violar as Regras do Fórum.</strong></font>
<strong><font size="0">Regras Violadas:</strong>
1.1 Flood: É proibido o flood. Caracteriza-se:
 -Quando é feito postagens seguidas, ou seja, postagem atrás de postagem;
 -Quando o usuário repete mensagens postadas acima em curto espaço de tempo;
 -Quando o usuário cita uma mensagem dita acima e não escreve nada mais ou faz uso de smileys;
 -Quando o usuário foge do contexto do tópico;
 -Quando são feitas postagens em curto intervalo de tempo em diferentes tópicos (clique aqui para ver um exemplo);
 -Fazer UP em tópico em menos de 24 horas;</font>
<font color="red" size="1">Evite transtornos, leia as </font><font size="0"><a href="http://www.nwdgames.com/t63857-regras-do-forum" target="_blank"><strong>Regras do Fórum</strong></a></strong></font>
<strong><font size="1">Atenciosamente,</font></strong>
<strong><font color="#ff0aff" size="1">COLOQUE_AQUI_SEU_NICK - Coordenador</font></strong>

Posts : 76
Reputation : 1
Language : Portuguese


Back to top Go down

In progress Re: (#12930) HTML IN modernbb

Post by Wecoc on August 23rd 2018, 6:55 pm

I know how to solve this. Insert this in your CSS:

#preview .postbody table, #preview .postbody td, div[class*='post--'] .postbody table, div[class*='post--'] .postbody td {
    border: none !important;
    border-spacing: 0;

The border-spacing line is not really necessary, but since in other tables its value is 0 I guess it's good to include it too.
It will affect all tables in posts. If you want tables in posts to remain the same but change it only in the Alert one, you could assign a new class to that table and apply the CSS to that class.

Also, your HTML could be cleaned a little bit.

HTML recommendations:
- You are using a lot of attributes inside the style parameter of table, I would rather create a class for the table and assign them in the CSS.

- The
font size="1"
codes don't seem to be working at all, why don't you set
font-size: 1rem;
in the table style and delete all those?

- You used double quotes inside a style parameter which already uses double quotes, use single quotes instead:
url('here the url')

- Don't use an url that redirects to another url to set the background of the table.

- And finally, this
in better than this
because in mantains the "code in blocks" format of HTML: tags inside other tags.

Hope this helps.

Male Posts : 136
Reputation : 98
Language : Catalan, Spanish, English


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

Permissions in this forum:
You cannot reply to topics in this forum