25 replies [Last post]
gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Hello,

Ive got a question i hope someone can help me with.

I am trying to change the layout when viewing in safari, but i do not want to change the layout when viewing in Internet Explorer or Firefox, therefore i need to write some code (css) that only safari can view.

Does anyone know how this is possible.

Any help would be appreciated

G.

p.s. I know you can hide from IE using child selectors so that only firefox and safari can view, but is it possible to hide from firefox/IE together?

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

fail.

Why are you trying to server a different layout to Safari?

Verschwindende wrote:
  • CSS doesn't make pies

ragamuffin
ragamuffin's picture
Offline
Leader
Iowa
Last seen: 12 years 38 weeks ago
Iowa
Joined: 2005-06-02
Posts: 691
Points: 0

Allow only Safari and not IE or Firefox to read css code

Quote:
I am trying to change the layout when viewing in safari, but i do not want to change the layout when viewing in Internet Explorer or Firefox, therefore i need to write some code (css) that only safari can view.

I never seen anything for this, but I am curious as to why you are wanting to do that?

- r

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

layout looks fine in IE and Firefox, but there are two images that are overlapping when viewing in safari, therefore i want to move those images only in safari and everything will look as planned

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

FAIL.

show us the site, let us help you fix it.

Verschwindende wrote:
  • CSS doesn't make pies

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

Ok url is: http://www.vested-interest.com/web/index.htm

Have included the css file that is responsible

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

Oooh my no!

  <DIV CLASS='1 drawMenuLines' onMouseover="this.style.backgroundColor='#ccff00'" onMouseout="this.style.backgroundColor='transparent'"><a href="about_us.htm" class="headings"><span class='menuText'><strong> &gt;  about us</strong></span></a></DIV>

  <DIV CLASS='1 drawMenuLines' onMouseover="this.style.backgroundColor='#ccff00'" onMouseout="this.style.backgroundColor='transparent'"><a href="latest_news.htm" class="headings"><span class='menuText'><strong> &gt;  latest news</strong></span></a></DIV>
  <DIV CLASS='1 drawMenuLines' onMouseover="this.style.backgroundColor='#ccff00'" onMouseout="this.style.backgroundColor='transparent'"><a href="contact.htm" class="headings"><span class='menuText'><strong> &gt;  contact</strong></span></a></DIV>
  <DIV CLASS='1 drawMenuLines' onMouseover="this.style.backgroundColor='#ccff00'" onMouseout="this.style.backgroundColor='transparent'"><a href="client_area.htm" class="headings"><span class='menuText'><strong> &gt; client area</strong></span></a></DIV>

<li>
		  <a href="literature/lit_isle_mill.htm">isle mill</a>
		  <div id="menuSubSection1" style="position:absolute; left:0px; top:40px; width:130px; height:20px; z-index:-10;  
		  background-color:#2D4B5D;filter: alpha(opacity=60); -moz-opacity:0.60; opacity:0.60;-khtml-opacity:0.60;">
		  <a href="index.htm" onMouseOut="MM_showHideLayers('menuSubSection1','','show')">&nbsp;&nbsp;</a>
		  </div>
		  </li>

http://validator.w3.org/check?uri=http://www.vested-interest.com/web/index.htm

21 validation errors.

Safari is the most standards-compliant browser there is.

There's a ton of better ways to achieve what you have there.

Verschwindende wrote:
  • CSS doesn't make pies

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

i know there will be validation errors, the site has not gone live, would use OnBlur, onFocus etc, just trying to get positioning right. Only put it up on webserver for viewing today

The primary browsers i have been using are IE and firefox, they work. Only problem is safari. If was just working in safari then that wouldnt be a problem

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

I can't see why Safari is a problem, as iirc safari and firefox are both built on the gecko rendering engine.

If you insist on using horrible absolute positioing and horrible javascript rollovers then I can't help; maybe Treva will help you rewrite your page Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

Thats not what i asked, i asked if there is a way to hide from all but safari. But thanks for the help

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

This is where the ever helpful Google comes in.

You did try Google, right?

Ah here we go the first result for safari hide css

http://www.stuffandnonsense.co.uk/archives/hide_css_from_safari.html

Verschwindende wrote:
  • CSS doesn't make pies

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

No came onto the forum first. But thanks for getting me the result. Your a star Wink

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

....except maybe you havent understood what i was enquiring about. to hide from everything but safari

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

Which means you shouldn't be trying to serve safari different CSS codes - you can't.

Fix your page and you won't need to.

Verschwindende wrote:
  • CSS doesn't make pies

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

the fact that i sent you the wrong google search only goes to prove my point. Ha ha good recovery.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

gavmc wrote:
the fact that i sent you the wrong google search only goes to prove my point. Ha ha good recovery.

Eh?

Verschwindende wrote:
  • CSS doesn't make pies

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

... you'd think i had nothing else to do.

Okay will expain it very carefully:

This was your reply to a previous message of mine, you wrote......

This is where the ever helpful Google comes in.

You did try Google, right?

Ah here we go the first result for safari hide css

http://www.stuffandnonsense.co.uk/archives/hide_css_from_safari.html

......Now trying to be smart and say i hadnt looked in google all very well, but why would you send me something not relating to my question.

You did a search on safari hide css. was this a mistake in your excitement to prove me wrong or were you trying to send me some cryptic message way too intelligent for my comprehension? Maybe it was either. I dont care.

Then i send a message back saying that is not what i was looking for.

And in your reply (lets call it reply...zzzzzzzzz).......you say....

Which means you shouldn't be trying to serve safari different CSS codes - you can't.

Fix your page and you won't need to.

So i was laughing at reply...zzzzzzzz, cause you sent me the wrong google search (or coulda been the cryptic one, who knows..maybe you do?), but you were keen to put your point forward.

Anyway was only looking for a civil answer to my first question. Will bid you good bye.

Why do i get the feeling i will hear back from you...hmmmm?

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 5 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Allow only Safari and not IE or Firefox to read css code

Hi

I hadn't seen this post.

The way you do it is to feed all browsers what you want Safari to see, then you hide the real code from safari and feed it to all the others:

#wrapper{
  background:#C0C0C0;
}
#wrapp\65	r{
  background:#000000;
}

You replace a character in the name with the escape code (eg \65 is an e) and then follow it with a tab, then finish the name.

Safari can't read this, all the other major ones can.

Trevor

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

Thanks alot,

will have a go at what you said.

Appreciate it

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

One last question...

Do you know where i can get a list of the escape codes. If not then will look for them.

G.

gavmc
Offline
Regular
Last seen: 16 years 21 weeks ago
Joined: 2005-07-14
Posts: 17
Points: 0

Allow only Safari and not IE or Firefox to read css code

No need,

just found the unicode table.

Thanks again

G.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

You know, I was trying to help you in the right direction. Your page is a complete mess.

(And you triple posted, which is a no-no on internet forums).

Verschwindende wrote:
  • CSS doesn't make pies

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 7 years 40 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

Allow only Safari and not IE or Firefox to read css code

Maybe he's a Microsoft developer.?

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 5 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Allow only Safari and not IE or Firefox to read css code

wolfcry911 wrote:
Maybe he's a Microsoft developer.?

:twisted: :twisted: :twisted: :twisted:

Anonymous
Anonymous's picture
Guru

Allow only Safari and not IE or Firefox to read css code

gavmc wrote:
... you'd think i had nothing else to do ...

Hmmm, you'd think we had nothing else to do either, eh? You are not going to get much help with such an attitude because you are showing that
  • you don't want help
  • you just want a hand out or quick fix (whether it is correct or not)
  • you don't really care if it is correct
  • you have no clue
  • you haven't tried yourself

Valid code is hard enough to debug.
http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

[/]
thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 4 days 17 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Allow only Safari and not IE or Firefox to read css code

Triumph wrote:

Valid code is hard enough to debug.
http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

bookmarked Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies