473,245 Members | 1,338 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,245 software developers and data experts.

Safari giving problem with {display:none}

hsriat
1,654 Expert 1GB
All the elements which were set as style={display:none} are still being shown in Safari (Apple's Browser)...

But when the same style is applied with javascript on an event, it hides the element.
Like this...
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('abc').style.display='none';
This one is also not working:
[HTML]style="{background-image:url('/img/logo.png');background-repeat:no-repeat}" [/HTML]

Both are working all good with Firefox, Opera and even IE 6 (which I actually didn't expect).

What could be the reason?
Feb 12 '08 #1
2 19353
Death Slaught
1,137 1GB
If you're using them as inline styles simply remove the curly braces.

Expand|Select|Wrap|Line Numbers
  1.  style="display:none;"
As for the image do the same and add a space between the colon and 'url'.

Expand|Select|Wrap|Line Numbers
  1.  style="background-image: url('location');"
Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
Feb 12 '08 #2
hsriat
1,654 Expert 1GB
If you're using them as inline styles simply remove the curly braces.

Expand|Select|Wrap|Line Numbers
  1.  style="display:none;"
As for the image do the same and add a space between the colon and 'url'.

Expand|Select|Wrap|Line Numbers
  1.  style="background-image: url('location');"
Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
oo.... thats working now!!
Thanks a lot!!! :)

Can you please tell me one more thing...
[HTML]<a class="button" id="ax1" href="javascript:void(0)" onclick='edit('x1')">&nbsp;Edit&nbsp;</a>[/HTML]

and function edit(id) is
Expand|Select|Wrap|Line Numbers
  1. function edit(id) {
  2.     var anc = document.getElementById('a'+id);
  3.      anc.innerHTML = anc.innerHTML=="&nbsp;Save&nbsp;" ? "&nbsp;Edit&nbsp;" : "&nbsp;Save&nbsp;";
  4. }
This is working fine with Firefox and IE, ie, the name of the A element gets changed from ' Save ' to ' Edit ' and ' Edit ' to ' Save ' on every click. But Opera and Safari are not doing any change.
If I remove the &nbsp; from both, then its working fine with all.
But since its a button kind of look, so I need to give space on both sides of the name.

How can I solve this?
Feb 13 '08 #3

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

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
10
by: JayB | last post by:
I'm using a style to hide a skip navigation link but it's not working out correctly. The style is: ..textBrowsersOnly { display: none; } I'm using it in a paragragh and in a navigation link...
1
by: fleemo17 | last post by:
For increased accessibility, I've replaced "display:none" with the Off-Left method of hiding my CSS drop-down menus because the Jaws screen reader doesn't see any of the menus hidden with...
2
by: 4MLA1FN | last post by:
i'm building a little web app for my research project. url is here: http://www.cognitivecomposites.com/wtf/ it validates as xhtml/strict according to: ...
2
by: Good Man | last post by:
Hi there I have quite a bit of experience with CSS but I am stumped by the following: http://www.electricphase.com/example/example1.php (uses http://www.electricphase.com/example/test1.css) ...
7
by: Janis | last post by:
I try to understand what could be the source of a problem with displaying and hiding rows of tables using display:block/none. I've read selfhtml but could not find any hint about that. Any...
7
by: bissatch | last post by:
Hi, I ocasionally use display: none; to hide divs that, on the click of a link they will reappear. For example, maybe I create a menu and when you click a link of menu options the submenu...
7
by: khinester | last post by:
Hello, I have the following template that basically does the following: User select Country, then a sub-list is generated with Regions and then this returns the Counties ############### ...
2
hsriat
by: hsriat | last post by:
Maximum how many elements can be made hidden by giving STYLE={DISPLAY:NONE} in a single HTML file. Any restriction?... If it is there.. any way out as I want to make 110 rows with DISPLAY:NONE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.