容器没有显示

时间:2013-03-21 08:33:33

标签: css3 html css-float

我对JSP和HTML比较陌生。我被要求为我在Perl的一些项目制作一个GUI。但是,我的容器有问题。 基本上,每个容器以单选按钮的形式显示从文件读取的结果。它工作正常,但突然间,其中一个容器开始消失。任何帮助将不胜感激。

提前致谢:)

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.io.*, java.net.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <title>Bi-Grams</title>
        <style type="text/css">
            body {background-color:white;}
            h3{color:black}
        </style>
    </head>
    <body>
        <h3>Tri-Grams of 13th Jan 2013 USA</h3> 
        <div id="content1" style="background-color:#EEEEEE;height:400px;width:400px;overflow:auto;border:2px solid;">
            <form>
                <%
                    int i=0;
                    String line = null;
                    String []line_parts;
                    request.setCharacterEncoding("UTF-8");
                    FileReader fis = new FileReader("/home/jones/testing/trigram-topics-13th.txt");
                    BufferedReader br = new BufferedReader(fis);
                        while(br.readLine() != null){
                        %>
                            <input type="radio" name="event_number" value="<%out.println(i);%>" >
                            <%  
                                line = br.readLine();
                                line_parts = line.split(" ");
                                out.println(line_parts[0]);
                            %>
                            <br>
                            <%
                            i++;
                        }
                    br.close();
                %>
            </form>
        </div>
        <br/>
        <h3>Tri-Grams of 14th Jan 2013 USA</h3>
        <div id="content2" style="background-color:#EEEEEE;height:400px;width:400px;overflow:auto;border:2px solid;">
            <form>
            <%
                request.setCharacterEncoding("UTF-8");
                fis = new FileReader("/home/jones/testing/trigram-topics-14th.txt");
                br = new BufferedReader(fis);
                    while(br.readLine() != null){
                    %>
                        <input type="radio" name="event_number" value="<%out.println(i);%>">
                        <%
                            line = br.readLine();
                            line_parts = line.split(" ");
                            out.println(line_parts[0]);
                        %>
                        <br>
                        <%
                        i++;
                    }
                br.close();
            %>
            </form>
        </div>
    </body>
</html>

1 个答案:

答案 0 :(得分:0)

在CSS文件中尝试: -

//lets assume you had it under the id 'container'
#container {
            display: inherit !important;
}

或者您可以在html文件中指定样式
示例:

<div style="display: inherit !important;"></div>