473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Safari Anomaly/oddity/bug?

All,

I've been trying to set up a CSS layout and all seems well in Firefox
but in Safari it just seems to be plain weird! I hope someone can help
tell me whether this is a problem with my code or a Safari oddity
(which if it is, any top-tips to fix it would be most welcome!).

Objective:
I want to have the meat of the viewport divided into 3 columns (a fixed
margin (say 140px) and 2 scalable panes on the right each of which
consume 50% of the remaining space). I want each of the right hand
panes to present scroll bars when the content (an image) is wider than
the space available thus keeping the left margin (menu) on screen.

Issue:
This works like a charm in Firefox 1.5. The 2 panes are alongside each
other in the riight place on the screen and when I resize the browser
window smaller scroll bars appear below each of the right hand panes.
When I open the same file in Safari 2.0.1, the righthand most pane
appears at only 25% of the space available leaving an odd gap of 25%.
I've tried altering the overflow and float properties but I just can't
get the effect I'm after in Safari.

Code:
Here is the entire page including style info
<html>
<head>
<title>Layout test</title>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<style type="text/css">
<!--
body {
background-color: #CCCCCC;
margin:0 0 0 0;
height:100%;
width:100%;
font-family: Verdana, Arial, Helvetica, sans-serif;
}

..masthead {
background-color: #FFFF00;
border:0 0 0 0;

text-align: right;
font-weight: normal;
font-size: 10px;
height:20px;
top:0;
padding-right: 10px;
padding-left: 10px;
}

/* the main content layer which contains the left and right blocks */
#main {
position: inherit;
background:#fff;
margin-left: 140px;
border:1px solid #000;
margin-bottom: 10px;
height:auto;
z-index:1;
bottom:0;
float:none;
}

/* left block */
#areaA {
width: 49.9%;
overflow: auto;
float:left;
}
/* right block */
#areaB {
left:50%;
width: 49.9%;
overflow:auto;
float:left;
}

#footer {
background-color: #FFFF00;
text-align: center;
font-weight: normal;
font-size: 10px;
height:3em;
position:auto;
width:100%;
float:left;
}

/* Formatting stuff */
#dilTitle {
font-size: 12px;
font-weight: bold;
}
#dilDesc {
font-size: 10px;
}

#dilImage {
text-align: center;
}
-->
</style>
</head>
<body>
<div class="masthead">Usu maiorum</div>

<!-- Main content layer -->
<div id="main">
<p id="dilTitle">Iuvaret consulatu et cum? Te dictas disputationi
cum</p>
<p id="dilDesc">Ex nihil expetenda percipitur sit, eos in wisi consul,
qualisque persecuti duo ea. Cum at primis regione, epicurei officiis
percipitur no usu, te pro mazim rationibus neglegentur. Ex mandamus
imperdiet sed, est ex soleat quodsi legimus. No est error constituam,
vim ad consul liberavisse, ex sed aperiam feugiat. </p>
<!--- left block --->
<div id="areaA">
<p id="dilTitle">Lorem Ipsum </p>
<p id="dilImage"><img src="blackbike.jpg" width="380" height="320"></p>
<p id="dilDesc">In alterum forensibus accommodare quo, has ut nonumy
quodsi mediocrem, quis utroque intellegebat ne quo. Ius debitis
invenire te, has maiorum partiendo voluptatum te? Mel aliquid veritus
id.</p>
</div>
<!--- right block --->
<div id="areaB">
<p id="dilTitle">Dolor sit</p>
<p id="dilImage"><img src="redbike.jpg" width="380" height="320"></p>
<p id="dilDesc">In alterum forensibus accommodare quo, has ut nonumy
quodsi mediocrem, quis utroque intellegebat ne quo. Ius debitis
invenire te, has maiorum partiendo voluptatum te? Mel aliquid veritus
id.</p>
</div>
<div id="footer">In alterum forensibus accommodare quo, has ut nonumy
quodsi mediocrem, quis utroque intellegebat ne quo. Ius debitis
invenire te, has maiorum partiendo voluptatum te? Mel aliquid veritus
id.</div>
</div>

</body>
</html>

This content is also posted here:
http://63.151.40.186/csstest/test01.htm

Any help would be greatly appreciated.
Thanks,
James

Feb 24 '06 #1
5 1767
jm********@gmail.com wrote:
All,

I've been trying to set up a CSS layout and all seems well in Firefox
but in Safari it just seems to be plain weird! I hope someone can help
tell me whether this is a problem with my code or a Safari oddity
(which if it is, any top-tips to fix it would be most welcome!).


Well, given that your code doesn't validate, I would say that is
probably the place to start. The first thing I noticed was that you
don't have a DOCTYPE declaration - that actually might help (try using
strict, BTW)

As for it being a Safari oddity - Safari is displaying it in accordance
with the CSS rules. Firefox is the one displaying it incorrectly - even
if that "incorrect" display happens to look the way you want.

Feb 24 '06 #2
Tony,

Thanks for the pointers - very useful.

James

Feb 25 '06 #3
Tony,

I now have a XHTML 1-strict validating page. Unsurprisingly, it works
like a charm with the desired effect on both browsers. Thanks again for
the tips.

I've posted the result in case anyone was interested.
http://63.151.40.186/csstest/test01.htm

James

Feb 25 '06 #4
In article <11**********************@e56g2000cwe.googlegroups .com>,
jm********@gmail.com wrote:
Tony,

I now have a XHTML 1-strict validating page. Unsurprisingly, it works
like a charm with the desired effect on both browsers. Thanks again for
the tips.

I've posted the result in case anyone was interested.
http://63.151.40.186/csstest/test01.htm


You might want to check the effect of your footer (especially
font-size: 10px;
height:3em; )
when a viewer has specified that their browser not permit a font size as
small as 10px (10px is unreadable for me on a 1920x1200 display). The
text overflows the background-color height. Might be worth considering
setting font sizes in em, so viewers can see the text in sizes they
prefer?

--
http://www.ericlindsay.com
Feb 25 '06 #5
Eric,

Thanks for the heads up. I've started making the change to ems (used it
in some places) and will do some more research to make the design
consistent. Sounds a good idea to me.

Thanks,
James

Feb 25 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: DU | last post by:
According to a recent post, it seems that Konqueror 3.1+ and Safari 1.1 support CSS3 opacity style property under a proprietary name: "Support for the CSS3 opacity (using -khtml-opacity)...
4
by: Bernard | last post by:
Hi, I am suddenly getting Safari script errors with the following user agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8 In a...
2
by: jdlwright | last post by:
Hi, I have a big script that doesn't work in Safari 1.3, but does work in FF, and IE. I've given up going to my local Uni. to use their Macs (they've prevented the Debug menu from appearing...
4
by: Paul W | last post by:
Hi - can someone point me to info on the issues/resolutions of supporting the safari browser? To help me understand, if I was developing pages in say FrontPage, what attributes would I set for...
5
by: Bill Cohagan | last post by:
I'm having some serious difficulties with my ASP.Net 2.0 app rendering in Safari 2.0.3. The most immediate problem is that the menu control doesn't seem to work at all, particularly the use of...
34
by: Simon Wigzell | last post by:
document...focus() will scroll the form to move the specified text field into view on everything I have tried it with except Safari on the MAC. The form doesn't move. Any work around? Thanks.
3
by: Jeff Paffett | last post by:
I'm trying to use the onPaste event in a text input, which according to Apple is supported. However, I get no response in Safari. Firefox works fine.
1
by: mai | last post by:
Hi everyone, i'm trying to exhibit FIFO anomaly(page replacement algorithm),, I searched over 2000 random strings but i couldnt find any anomaly,, am i I doing it right?,, Please help,,,The...
3
by: SAM | last post by:
Geoff Cox a écrit : Didn't try but following what you say : move the mouse, it seems that Safari keeps focus on the clicked image and avoid the changing see bellow // perhaps here :
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.