473,769 Members | 5,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Firefox display problem for display:block

1 New Member
Hi,

I'm developing a portfolio site, which contains a bunch of thumbnails wrapped in links: <a href="..."><img ... /></a>. A window.onload script inserts an onclick property into the links which changes their behaviour to load the big image in a <div> on the same page, instead of going to another site. For that purpose I have a <div><img ... /></div> construct in the page which is set to a fixed height and width and 'display: none' via CSS. The onload script changes the 'display: none' to 'block' (just '' doesn't work somehow).

I.e. non-JS enabled browsers display a bunch of thumbnails that open a new page when you click on them, JS enabled browsers can display them on the same page.

The problem is that the layout is slightly different with or without the hidden <div> container. Safari and Opera both resize the page properly and shift the other elements accordingly, Firefox does not. How can I make FF recalculate the space needed for the <div>?
Nov 14 '06 #1
1 2403
acoder
16,027 Recognized Expert Moderator MVP
Perhaps the div is absolutely positioned and needs to be relatively positioned with "position: relative".
May 29 '08 #2

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

Similar topics

7
4685
by: Jeff Thies | last post by:
I'm trying to do a nav list using list items. Roughly this is putting links styled display: block and with a background color. In IE5 (windows, haven't tried Mac yet), adding the display: block for the link adds a bit of whitespace between the list items. NS7.1 does not do this. Why the whitespace (about 5px)? Is it possible to get IE and NS looking
18
5632
by: David Morris | last post by:
G'day. Is there a known "display:block;" problem in opera? In playing around trying to get some cross browser conformance, I either inadvertently or redundantly (depending on your perspective) added "display:block;" to a style defining tables that also had zero padding, margin and border. With "xdisplay:block;" (that is nothing) all browsers (well Ie6, MZ, Ff Op in
2
1902
by: Richard | last post by:
When using display:block in a list array, is there a way to give a bit of seperation between the actual displays? ul {display:block;} ul li {display:block;} <ul> <li>item 1</> <li>item 2</li> <li>item 3</li>
7
5773
by: Marc | last post by:
Hi everyone. I am having trouble with a stylesheet in mozilla. It is part of turning a list into a menu: #menu li{ margin: 0; display: inline; vertical-align: bottom;
6
6201
by: Sandman | last post by:
I'm having some problem here... I have a javascript I've downloaded that goes through all PNG files and enables the transparency channel in them for IE5.5+ by converting them to SPAN layers with the image as background. This works great until I put one of these PNG files inside a display:none block and later sets the block to display:block - then the SPAN (that was the PNG <img>) remains hidden.
1
2203
by: pastrami | last post by:
Hey guys, I was wondering if someone can check my css setup, for some reason my pictures are not coming out centered in FF but it is centered in IE. table#gallery { display:none; text-align: center; margin-right:auto; margin-left:auto; }
7
3077
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 pointers why that can happen, or how I should take care of that type of problem/effect are highly appreciated. The problem... A couple times the hiding/displaying works, but _occasionally_ the entries are hidden but _blank lines appear_, instead.
3
11790
by: Chandra | last post by:
Hi All, I have 2 htmls with one being referred in iframe of the other. The iframe html has style display = block and none set in the javascript. however this makes the block go behind the parent html contents and not on top of it. Any idea how to resolve this? Thanks, Chandra
3
23904
by: WSPL5 | last post by:
I have a hidden span within a table column and I cannot unhide it using style.display='block' ?? Sample code <table> <tr> <td><input name="status" value=""></td><td><input type="button" value="search" onClick="searchByStatus()"></td> <td><div id="MySpan" Style="display:none"><img src="ajaxprogressindicator.gif"></div></td> </tr> </table>
1
7622
by: joeblogs | last post by:
<table> <tr> <td style="display:block">Cell 1</td> <td style="display:block">Cell 2</td> </tr> </table> The above HTML displays the following in Fire Fox Cell 1
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9416
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9849
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7393
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.