By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,574 Members | 1,568 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,574 IT Pros & Developers. It's quick & easy.

CSS / Style Isolation / Reset

P: 1

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!
Mar 26 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 7,435
Not sure if this is what you are looking for. You can wrap that part of the content in a div and assign it an 'id'. Then, in CSS, you can assign that styling to that div only.
Expand|Select|Wrap|Line Numbers
  1. #visitor_markup p {background-color:#ccc; font-size:24px}
<div id="visitor_markup">
<p>I am a dopey visitor</p>
Mar 26 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.