Stop CSS styles to be applied in particular sections of the code

前端 未结 4 825
眼角桃花
眼角桃花 2020-12-11 20:14

This question may sound a bit weird/novice/stupid. Please bear with me.

The below code is a small portion of a webpage I have created using CSS, HTML and coldfusion.

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 21:16

    What about using if else instead of just if to determine which css file you should include? In other words, include styles.css only when part 2 displays. That way, you avoid inheritance and scoping issues altogether.

提交回复
热议问题