Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Sunday, March 17, 2013

How to make selected menu option active by using css

Lets take an example if we are using jsp for menu and we have four pages and every page is using same menu so we have created a single menu page and all other pages are using that menu with the help of jsp:include tag.

Now we want our each menu option be active on click and we don't want to use js(javascript).

So here is a solution of this problem :
CSS code:

HTML or JSP code:

After including jsp code in each menu required page you need to give id in <body id=""> tag as shown below and that id will be different for each menu page.

Sunday, March 10, 2013

Error! Problem in linking css file in jsp in Dynamic web Project with eclipse

When we have to link our css file that exists in css folder during dynamic web project in eclipse it shows problem regarding image loading or other linking problem.

Project Structure
Solution: If your project is in above structure then to solve out this problem you must specify your project name in link of css file like as below


Thursday, February 28, 2013

Error in handling images and css folder with jsp page in eclipse

If you are creating a dynamic web project and you are not able to use css folder files and image files in your jsp page then you need to read below code.

Project folder structure

Linking css file internally from folder to jsp page

Linking image to jsp page from images folder

Popular Posts