开发者

How to style an embedded jsp inside another jsp?

开发者 https://www.devze.com 2023-02-07 14:57 出处:网络
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

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

精彩评论

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