Click to See Complete Forum and Search --> : CSS / Style Isolation or Reset


JimLiu
03-26-2008, 08:57 AM
Hi,

One of my website has a page that has a part is generated from user input. Users are allowed to input some simple HTML code like <b>, <i>...etc. One of the problem is that if a user input is incomplete (like <b><i>test</i>), the rest of the page (static content) will be affected (in the case be bold).

Is there anyway I can isolate all HTML / CSS styles to that section of the webpage (maybe a DIV)? Or perhaps I can reset the style and apply new style on other part of the webpage?

Any idea would be appreciated. Thanks!

WebJoel
03-26-2008, 09:45 AM
Some user-forms that I have visited allow use of HTML tagsets but you have to actualy choose from the ones provided ("<b></b>", "<i></i>", etc) and thus it provides not only the opening demiters & tag, but the closing one as well. My html-editor has this. A list of available tags and forms and TABLE-layout, etc... you choose what you want, say "table", and it pastes this:<table>
<tr>
<td></td>
</tr>
</table> onto the document.

Same with "<b></b>", "<i></i>", etc.

Read: idiot-proof

JimLiu
03-26-2008, 10:04 AM
Thanks for the response. However our inputs are actually RSS feeds, and your suggestion doesn't apply here. Thanks anyway :)