开发者

How to style an embedded jsp inside another jsp?

I am a css/javascript beginner. How would I access an HTML ele开发者_运维百科ment of a jsp that's embedded inside another jsp and css style it? I am not allowed to modify the first one directly, so I was wondering if I could style it from within the second one.


If i understand you correctly you can access your Html by Tag or Attributes (class,id,rel...)

Maybe this is your Html...

<div id="content">
    <p>Lorem Ipsum</p>
    <p class="para">Lorem Ipsum</p>
</div>

And now you can access your Html with various selectors:

/*CSS*/
div {color:red}
div > p {color:blue}
.para {color:green}
#content .para {background:red}

Good ressource: http://www.w3schools.com/css/css_intro.asp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜