473,397 Members | 2,033 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,397 software developers and data experts.

serving CSS to Safari (Mac)

ctoz
13
Didn't think I'd ever need to serve CSS to Safari--but that's what I need: tried all sorts of compromises on styling, just about exhausted the possibilities there, won't bore you with 'em.

Anyone?

cheers

CT
Jul 23 '07 #1
5 1767
tburger
58
What are the primary styling issues? Is it alignment? Or perhaps the way fonts are rendered?

If you could give us some code or a link to a site, that would help out a lot.

Tom
Jul 23 '07 #2
ctoz
13
Found a couple of hacks:
http://www.evotech.net/blog/2007/06/targeting-safari-30-with-css/
http://www.simiandesign.com/blog-fu/2005/11/safari_css_hack.php

It's an alignment problem, tested so far on Mac, and not yet on win. Link text at the bottom of a div , below 2 layers, each with relative positioning, negative margin on one layer... StrictDTD.

Safari renders the text correctly, but Opera and Firefox put the text about 8px too high, overlapping the main content. So if I style the link for them two villains,
I need to feed SDafari something else.

The alignment is totally unrelated to the negative margin on the layer.

CT
Jul 23 '07 #3
tburger
58
Have you tried a global reset? This is commonly used, in some form, to account for the differences among browsers.

*{
margin: 0px;
padding: 0px;
}

The '*' character is a global selector. This means that all html elements will now have an initial margin and padding of 0px.

Yahoo also offers some cross-browser assistance, check it out:

http://developer.yahoo.com/yui/reset/

This file can be linked to your HTML file as an additional style sheet and will essentially have the same effect as the global reset.

Do you have this up anywhere where I can take a look at it?

I'm working primarily on a mac, so I have safari to test with.

Tom
Jul 23 '07 #4
ctoz
13
Forgot about the reset, many thanks! too tired to un-do the fixes I just applied, will leave it til the morning. DTD has no effect... watch this space...

CT
Jul 23 '07 #5
ctoz
13
Global fix alters the problem slightly, but Safari still displays the link tag lower.
The link spacing is in fact related to the positioning of the elements preceding it.

I've now gone to work, where I've tweaked for windows. So it may look wildly off on a mac. Any help there would be great.

The code below is ok on IE6, 7, Firefox and Opera, but needs fiddling for Safari Win.

I've bundled up the css & html into one file, and deleted 7/8 of the html ... : )

cheers

CT


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>shortchange</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
*{
margin: 0px;
padding: 0px;
}
body {background:#444; padding:36px 0 0 0; font-size:13px}

.row {margin:0 0 18px 36px; float:left; clear:both}
.node {margin:0 12px 0 0; float:left; height:4.8em; width:6.4em;}

.hex, .mov {position:relative;
font:bold 1.5em/0.3em courier new, bitstream vera sans mono, monospace; letter-spacing:-0.3em; }
.hex {z-index:12; color:black;}
.mov {z-index:11; color:#b13; top:-1.9em}

/* .mov top is too big for Safari WIN, and not checked on mac */
/* NB, both classes visible for testing: .mov hidden during script application */

a.hexname {position:relative; top:-3.7em; font:0.76em arial verdana, sans-serif; color:white; text-decoration:none; overflow:visible;}
/* top dimension is for Safari, but is not currently tested on mac */

a.hexname:hover {background:black;}

a.hexname {position:relative; top:-3.7em; #}
/* for not-Safari browsers: not tested on mac */

/* javascript colours: .a, .b {color:#e10} moving: {color:#d02} */
</style>
</head><body>
<div class="row eight">
<div class="node _81">
<div class="hex A A A A A A" id="h01">
<p class="a8 _6">-------<p />
<p class="a8 _5">-------<p />
<p class="a8 _4">-------<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M M M M" id="m01">
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Heaven</a></div>
<div class="node _82">
<div class="hex A A A A B B" id="h34">
<p class="b8 _6">--- ---<p />
<p class="b8 _5">--- ---<p />
<p class="a8 _4">-------<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M M N N" id="m34">
<p class="m">--- ---<p />
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Great Power</a></div>
<div class="node _83">
<div class="hex A A A B A B" id="h05">
<p class="b8 _6">--- ---<p />
<p class="a8 _5">-------<p />
<p class="b8 _4">--- ---<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M N M N" id="m05">
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Waiting</a></div>
<div class="node _84">
<div class="hex A A A B B A" id="h26">
<p class="a8 _6">-------<p />
<p class="b8 _5">--- ---<p />
<p class="b8 _4">--- ---<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M N N M" id="m26">
<p class="m">-------<p />
<p class="m">--- ---<p />
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Great Increment</a></div>
<div class="node _85">
<div class="hex A A A B B B" id="h11">
<p class="b8 _6">--- ---<p />
<p class="b8 _5">--- ---<p />
<p class="b8 _4">--- ---<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M N N N" id="m11">
<p class="m">--- ---<p />
<p class="m">--- ---<p />
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Peace</a></div>
<div class="node _86">
<div class="hex A A A B A A" id="h09">
<p class="a8 _6">-------<p />
<p class="a8 _5">-------<p />
<p class="b8 _4">--- ---<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M N M M" id="m09">
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Little Increment</a></div>
<div class="node _87">
<div class="hex A A A A B A" id="h14">
<p class="a8 _6">-------<p />
<p class="b8 _5">--- ---<p />
<p class="a8 _4">-------<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M M N M" id="m14">
<p class="m">-------<p />
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Great Possession</a></div>
<div class="node _88">
<div class="hex A A A A A B" id="h43">
<p class="b8 _6">--- ---<p />
<p class="a8 _5">-------<p />
<p class="a8 _4">-------<p />
<p class="a8 _3">-------<p />
<p class="a8 _2">-------<p />
<p class="a8 _1">-------<p /></div>
<div class="mov M M M M M N" id="m43">
<p class="m">--- ---<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p />
<p class="m">-------<p /></div>
<a class="hexname" href="">Resolution</a></div>
</div><!-- row eight -->
</body></html>
Jul 24 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Foreman | last post by:
Using ASPFileUpload (http://support.microsoft.com/default.aspx?scid=kb;en-us;299692) and works for IE6 and FireFox but not Safari. Thanks in advance for your assistance.
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: laredotornado | last post by:
Hi, Is it possible to fool Javascript running on a Mac Safari web browser into believing it is a PC IE browser? We have the following JS code that is detecting both Mac and Safari. Sadly, we do...
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...
2
by: Simon Wigzell | last post by:
I use onkeypress() within text fields in my forms to chcek certain characters e.g. allow numbers for a phone number or credit card field. The code looks at the key pressed and if it is not numberic...
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.
16
by: Edward | last post by:
Hi All, I am having huge problems with a very simple dotnet framework web page (www.gbab.net/ztest3.aspx) , it does NOT render correctly under Apple's Safari. The DIV's do not align amd float as...
7
by: Tom | last post by:
I have an oo-type javascript program running perfectly on IE 6.0+, FF 1.5+, and Opera 7+ on Windows 98+, Linux (RH 9, FC 6), and Mac OS X. 4. As usual, the Safari browser is not working correctly,...
3
by: maya | last post by:
www.francesdelrio.com/photoblog_c/section1/page2/photos.jsp right on top and right underneath thumbnails are background-images (the "up" and "down" arrows), but they're not showing in FF on the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.