Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6188665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:16:30+00:00 2026-05-24T02:16:30+00:00

I have a webpage in which I am using 2 jsp:include directives. Basically one

  • 0

I have a webpage in which I am using 2 jsp:include directives. Basically one is the header and other is the footer. The headers and footers are aligned correctly. But the central body of the main page is aligned to the left side.

This is the code of the page.

page.jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<%@page contentType="text/html" import="java.util.*" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="images/style.css" type="text/css" />
<title>HireZilla</title>
</head>
<body>
    <jsp:include page="../top_and_left.jsp" flush="false"></jsp:include>
    <div id="contenttext" align="center">
        Hello World!!
    </div>
    <jsp:include page="../footer.jsp" flush="false"></jsp:include>
</body>
</html>

This is the code in the browser. I can see that there are lot of tags lying here and there because of the “jsp:include”s. But i dont know how to remove them.

The div tag with “Hello World” gets aligned in the left most corner of the page after the header and before footer elements. My header(“top_and_left.jsp”) as the name suggests has an ‘L’ shape with links in the left side of the page and a banner in the top. I want the div tag to come inside the L. I am able to do this in browsers ie8 and above but not in ie7.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<link rel="stylesheet" href="../../css/style.css" type="text/css" /> 
<title>HireZilla</title> 
</head> 
<body> 
    <div id="page" align="center"> 
    <div id="toppage" align="center"> 
        <div id="date"> 
            <div class="smalltext" style="padding:13px;"><strong>Wed Jul 27 23:14:08 IST 2011</strong></div> 
        </div> 
        <div id="topbar"> 
            --Links in the top right corner--
        </div> 
    </div> 
    <div id="header" align="center"> 
        <div class="titletext" id="logo"> 
            <div class="logotext" style="margin:30px">Hire<span class="orangelogotext">Z</span>illa</div> 
        </div> 
        <div id="pagetitle"> 
            <div id="title" class="titletext" align="right" >Welcome to HireZilla!</div> 
        </div> 
    </div> 
    <div id="content" align="center"> 
        <div id="menu" align="right"> 
            <div id="linksmenu" align="center"> 
                --Left link panel menu--
            </div> 

        </div> 
    </div> 

    <div id="contenttext" align="center"> 
        Hello World!!
    </div> 


<div id="footer" class="smallgraytext" align="center" style="margin-left:225px" > 
        --Footer goes here--
</div> 


    </div> 
</body> 
</html>

This is the contenttext element in my css

#contenttext{
width:608px;
background-color:#F7F7F7; 
border-left:solid 1px #999999; border-right:solid 1px #999999; 
border-bottom:solid 1px #999999; border-top:dotted 1px #CCCCCC; 
min-height:360px;
}

I am not sure whether I have put the question in the right way. I would be happy to clarify.

I dont want to crowd this page more with the css also. If you can let me know which elements you want to see, I can paste their code here.
Thanks in Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:16:31+00:00Added an answer on May 24, 2026 at 2:16 am

    You are including a full html page within the body of another html page. This is causing all kinds of invalid html.

    To fix this, strip all of the extra stuff out of footer.jsp and top_and_left.jsp. Remove the <html>, <head>, <body>, etc. The file should only include the html which you want injected into your body. This will likely clean up most of your issues.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to create a dynamic reporting webpage using JSP. Basically it should contain
I have built a web page which contains a Crystal Report built using the
I have a main window (#1) on my webpage from which I open a
We have an advanced webpage (ASP.NET, C#), and a application which needs to be
I have a txt file which actually is a html source of some webpage.
I have created a chart using JFreeChart inside a JSP. I want to render
I have a webpage which I would like users to be able to send
The Scenario: I have an ASP.Net webpage which I intend to use for letting
Here's the scenario: I have an asp.net webpage which displays dynamic data in a
I have a webpage from the Fogbugz bug tracking system, and using a plugin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.