Problem with <DIV> css in Safari

I have created a small test website to show the problem I am having. In IE everything looks ok, but when I open in Safari the <div>'s are not correct. In Safari, the top level divs of row1, row2 and row3 are stacked up at the top and the inner divs of R1.1, R1.2, R2.f, R3.1 and R3.2 expand in there own area.
The inner divs of R1.1, R1.2 etc have no effect on the size of the outer divs of row1, row2 etc
Here is my code, code-behind and css.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestSafari.aspx.cs" Inherits="Default4" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
    
      function pageLoad() {
      }
    
    </script>
    <link href="vStyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="row1" class="ReservationRow">
            <div id="R1.1" class="ReservationCol1">
                This is area R1.1
            </div>
            <div id="R1.2" class="ReservationCol2">
                This is area R1.2
            </div>
        </div>
        <div id="row2" class="ReservationRow">
            <div id="R2.f" class="ReservationColFull">
                This is area R2.full
            </div>
        </div>
        <div id="row3" class="ReservationRow">
            <div id="r3.1" class="ReservationCol1">
                This is area 3.1
            </div>
            <div id="r3.2" class="ReservationCol2">
            </div>
        </div>     
    </div>
    </form>
</body>
</html>
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class Default4 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
            Page.ClientTarget = "uplevel";
    }
}
 
body {
}
.ReservationRow
{
    width:80%;
    margin-left:auto;
    margin-right:auto;
    border-style:double;
    border-color:Black;
    border-width:thick;
}
.ReservationCol1
{
    float:left;
    width:49%;
    border-style:solid;
    border-color:Red;
    border-width:medium;
}
.ReservationCol2
{
    float:right;
    width:49%;
    border-style:solid;
    border-color:Blue;
    border-width:medium;
}
.ReservationColFull
{
    margin-left:auto;
    margin-right:auto;
    width:98%;
    border-style:solid;
    border-color:Fuchsia;
    border-width:medium;
}

Open in new window

ubo-jfeeneyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
ubo-jfeeneyAuthor Commented:
I found it:
I needed to add overflow:auto to the css of the ReservationRow class
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.