How to style an embedded jsp inside another jsp?


Tags: css,jsp

Problem :

I am a css/javascript beginner. How would I access an HTML element 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.



Solution :

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


    CSS Howto..

    How to mix 100% height with a minimum height

    How to remove the blue border around ImageMap control in the Internet Explorer?

    How to write css for each page in rails 3

    How to place a div right below another div?

    How to refer in CSS to all elements that have some attribute?

    How do I know which CSS is overriding my background image?

    How do I add a custom font to the part of ConvertTo-HTML?

    How I can overlap a DIV on to other DIV?

    How to animate my header to slide in horizontally from left to page view on load?

    Flexbox in Chrome--How to limit size of nested elements? [duplicate]

    How to fix animation problems css3

    How can I align this?

    How to represent x and y in svg symbol

    JavaFx how to align only one column-header in tableview?

    How to make HTML pages print at a consistent size from Chrome?

    Developer Tools: How can I quickly check the difference in styles between normal state and :focus?

    How to make Angular Forms ngModel classes inherit from Bootstrap Forms classes

    CSS question how to make one div appear over another?

    How to handle Chrome rendering dynamically added elements with incomplete CSS

    How to use Vendor Properties in Multiple Backgrounds?

    how to put image on button? (css)

    how to hidden image over image in css

    How to change Bootstrap-select's placeholder color

    How to make one Div's position (not child or parent) completely linked / dependent on another Div's position?

    How do I make my picture slideshow stay behind my header

    CSS - How to resize texboxes with background image when browser is resized?

    How to break up long words but leave out short ones?

    How to set the style of the message in an SWT Text field?

    How to select Parent Div in CSS [duplicate]

    In a framework using rewrite rules, how best to integrate CSS and JS?