hi all

I have created a online Bus Ticket Booking dynamic website using JSP, SERVLET, CSS,JAVASCRIPT. And i have some issue related to table view
on my index page there is a table for ticket booking and it is displaying properly on Mozilla Firefox but unable to be displayed properly on Internet Explorer. given below is the css for table :

#maincontent table{

       line-height:1px;
       margin: 0 auto;
      /* margin-bottom: 10px;*/
       background-color:#FBEFF5;
       padding: 0px;
}
#maincontent th{
    border-top:3px solid #970205;
    border-bottom:3px solid #970205;
    padding:5px;
    color:#ffe401;
    background-color:#CA0308;
    text-align:center;
    


}
#maincontent td{
    padding:2px;
    font-size: 12px;
}

Anyone can help please?

thanks in advance

Recommended Answers

All 3 Replies

Could you also provide the code for the table? This way we can try to duplicate the problem ourselves and it'll be easier to find a solution.

I cannot see any problems with your CSS although I would suggest using classes and not IDs.

Hi here is the code for my table...

<table>
                        <tr>
                            <th colspan="3" align="center">Book your ticket now!!!</th>
                        </tr>


                        <tr>
                            <td colspan=3 align="center"> <input type="radio" name="radioTrip" value="oneway" checked="checked" onclick="ch()" />One-way
                                &nbsp;&nbsp;<input type="radio" name="radioTrip" value="round" onclick="ch()" />Round-Trip</td>

                        </tr>
             <tr>
                            <td>From</td>
                            <%
                             stmtSelectSource=con.createStatement();
                           rsSelectSource = stmtSelectSource.executeQuery(sqlSelectSource);%>
                            <td><select name="listFrom" id="listFrom">
                          <option>----Select City----</option>
                      <%while (rsSelectSource.next())
                         {%>
                         <option><%=rsSelectSource.getString(1)%></option>
                    <%}%>
</select>
                        </td>
                        
                </tr>
                        <tr>
                            <td>To</td>
                            <%
                             stmtSelectDestination=con.createStatement();
                           rsSelectDestination = stmtSelectDestination.executeQuery(sqlSelectDestination);%>
                           <td><select name="listTo" id="listTo">
                          <option>----Select City----</option>
                      <%while (rsSelectDestination.next())
                         {%>
                         <option><%=rsSelectDestination.getString(1)%></option>
                    <%}%>
                                </select></td>
                        </tr>
<%
                    DateFormat df = new SimpleDateFormat("yyyy/MM/dd");
                    String currentDate = df.format(new Date());
                   %>
                        <tr>
                            <td>Date of Journey :</td>
                            <td><input type="text" value=<%=currentDate%> name="from" id="fromDate"/><input type="button" name="btnFrom" value="cal" onclick="displayCalendar(document.frmIndex.from,'yyyy/mm/dd',this)"/></td>
                            <%--<td><input type="text" name="txtDoj" /><%--<img src="images/calendar.jpg" alt="Starflower"/></td>--%>
                        </tr>
                        <tr>
                            <td>Date of Return :</td>
                            <td align="bottom"><input type="text" value=<%=currentDate%> name="to" id="toDate"   disabled/><input type="button" name="btnTo" value="cal"  disabled onclick="displayCalendar(document.frmIndex.to,'yyyy/mm/dd',this)"/></td>
                                <%--<td align="bottom"><input type="text" name="txtDor" /><input type="image" name="cal" src="images/calendar.jpg" alt="" width="20" height="20"/></td>--%>
                        </tr>
                        <tr></tr><tr></tr>
                        <tr><td align="center" colspan="100">No. of Pasenger</td></tr>
                        <tr></tr><tr></tr>

                        <tr>
                            <td colspan=3 align="center">Onward :
                            <select name="listNumOFPerson" id="listNumOfPerson">
                                   <%-- <option>----Select----</option>--%>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                </select> 

                              Return :
                                <select name="listNumOFPersonRe" id="listNumOfPersonRe" disabled>
                                    <option>1</option>
                                    <option>2</option>
                                    <option>3</option>
                                    <option>4</option>
                                </select></td>

                        </tr>
                        <tr>
                            <td colspan=3 align="center"><img src="images/searchbuses.png"  alt="Continue" onmouseover="this.src='images/searchbusesMouseOver.png';" onmouseout="this.src='images/searchbuses.png';" border="1" name="checkAvl" onclick="checkSelect()"/></td>

                        </tr>

                        </table>

You should never use tables for layout, this is not the year 1996. All of your markup is deprecated.

Have a look at CSS.

Regards, Arkinder

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.