MyBB Community Forums

Full Version: <style> code in topics?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am running a role play forum with MyBB. In role play forums, it is very common that users open their shipping topics with their own html code, and sometimes using CSS codes. But, I realized that even though I can use HTML on forum topics (thanks to HTML Permission plugin), if I add a CSS code with <style>, it doesn't work. I can fix it adding these style codes to divs, like, "<div style="#code#"> but I sometimes have "hover" codes for those divs and then I just need to add it between <style> codes.

I wonder if it is possible to use style codes in topics.

Thank you.
Try using this code:
<script type="text/css">
.class {
attribute: value;
}
</script>
Unfortunately, it didn't work. It didn't get the codes, they just showed up on the topic.
Try using this code:
<link rel="stylesheet" type="text/css" href="http://domain.com/stylesheet_location" />
AFAIK... css styles wont work in topics and posts unless its used inside a html tag like div, span etc.
(2012-10-22, 07:19 PM)JordanMussi Wrote: [ -> ]Try using this code:
<link rel="stylesheet" type="text/css" href="http://domain.com/stylesheet_location" />

I think this would work but as I said, although I can add styles to the css file of my theme, the users can't. But thank you for your help.

(2012-10-22, 07:26 PM)mmadhankumar Wrote: [ -> ]AFAIK... css styles wont work in topics and posts unless its used inside a html tag like div, span etc.

Then I shouldn't use hover codes or things like this that can't be added inside divs. I hope there will be a solution found for this soon or I will find out why it can't work on topics. But if there is anyone else who knows the solution, please share with me. It would be better if I could use CSS codes individually.
AFAIK.... The <style> tag wont work in posts because they are read as plain text and will be rendered as it is

Only when used in a div or span or other html tags they are read as html codes and correctly rendered
This plugin allows users to make and customize their own stylesheets: http://mybbhacks.zingaburga.com/showthread.php?tid=1300