3

Here is my Index.html; it made up of four JSP files. The three JSP files are placed correctly with the black background, and only content.jsp is weird to show only in the left top corner part with the white background.

    **#content{
      float: left;
    }**
<div id="header">
  <iframe frameborder="0" src="/header.jsp" name="header"></iframe>
</div>
<div id="nav">
  <iframe frameborder="0" src="/navigator.jsp" name="nav"></iframe>
</div>
**<div id="content">**
  **<iframe frameborder="0" src="/content.jsp" name="content";>**</iframe>
</div>
<div id="footer">
  <iframe frameborder="0" src="/footer.jsp" name="footer"></iframe>
</div>

Content.jsp is below:

    li{
        list-style:none;
        padding:0px 5px;
        margin:0;
        display:block;
        float:left;
    }
<ul>
<c:forEach items="${page.bookList}" var="book">
<li>
    <a href="/book?method=book_detalis&b_id=${book.b_id}" ><img src="/${book.image_path}">
    ${book.name}<br>${book.price}</a>
</li>
</c:forEach>
</ul>

I ask for a piece of HTML element properties code in Index.html or Content.jsp that makes content.jsp to display fully.

The problem screenshot is below:

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ace Ace
  • 57
  • 7
  • 4
    Not sure what your actual problem is; but using multiple iframes to build the overall structure of a site (what it looks like here with your frames loading a navigation, a footer etc. by the names of it) is not a good way to go about things to begin with. – misorude Nov 12 '18 at 07:35

1 Answers1

2

There seems to be nothing to specify the size of the iframe so it defaults to a small area.

iframe {
  width: 100%;
}

See this question for more: Full-screen iframe with a height of 100%

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61