473,497 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Another css-popups problem

Nik
I'm trying to combine css-popups with an images-in-inline-lists gallery.

The problem I see with
http://www.niksally.f2s.com/upload/gallery/gallery.html

is that the images jog when the mouse goes over the first <imgin each
line. This appears in FF2 (and 1.0) but not in IE6. The images return
to their original position only when another <imgis mouse-overed
(moused-over??), not when the mouse leaves the first.

I've prepared a minimum test case at
http://www.niksally.f2s.com/upload/g...line_test.html - this
doesn't show the same problems, but I'd be grateful for any pointers as
to where to start looking when I try to re-construct this to my final
design.

TIA,

Nik
Nov 22 '06 #1
7 1735
Nik
Nik wrote:
>
I've prepared a minimum test case at
http://www.niksally.f2s.com/upload/g...line_test.html - this
doesn't show the same problems, but I'd be grateful for any pointers as
to where to start looking when I try to re-construct this to my final
design.
Correction: The minimised test-case does show the same jogging if the
window is narrow enough to force the list onto three lines. On my
system the is around 1000px. The jogging is not entirely consistent, as
far as I can tell.

Nik
Nov 22 '06 #2
Nik wrote:
Nik wrote:
>I've prepared a minimum test case at
http://www.niksally.f2s.com/upload/g...line_test.html - this
doesn't show the same problems, but I'd be grateful for any pointers
as to where to start looking when I try to re-construct this to my
final design.
Correction: The minimised test-case does show the same jogging if the
window is narrow enough to force the list onto three lines. On my
system the is around 1000px. The jogging is not entirely consistent, as
far as I can tell.

Nik
Your div#innerbox has an overflow: hidden; rule. What do you need that
for? What do you suppose it gives you?

If you take it out, does it fix the problem for you, as it seems to for
me? Does it cause some other problem?

--
John
Nov 23 '06 #3
Nik
John Hosking wrote:
>

Your div#innerbox has an overflow: hidden; rule. What do you need that
for? What do you suppose it gives you?

If you take it out, does it fix the problem for you, as it seems to for
me? Does it cause some other problem?
John,

Thank you for looking at this.

The innerbox overflow:hidden means that for *very* narrow windows the
images will go behind the right-hand border rather than over it. It's
appropriate for other pages that contain only a single image rather that
the inline-list. On the Gallery page it requires a window down to about
475px wide.

I have Spartanicus' resizing of images in columns [1] on my to-do list,
so I wouldn't need the overflow setting when I've sorted that.

I took out the overflow:hidden from the CSS and I still see the jogging.

Nik

[1: http://homepage.ntlworld.ie/spartani...in_column.htm]
Nov 23 '06 #4
Nik wrote:
John,

Thank you for looking at this.
Sure, glad to, Nik. I'm learning a lot.
The innerbox overflow:hidden means that for *very* narrow windows the
images will go behind the right-hand border rather than over it. It's
appropriate for other pages that contain only a single image rather that
the inline-list. On the Gallery page it requires a window down to about
475px wide.
I took out the overflow:hidden from the CSS and I still see the jogging.
So sorry to hear that. I could have sworn it was working for me.

But don't despair; I've fixed it again ;-)

Unfortunately, although I think I can describe what happens, I can't
satisfactorily explain the causes behind it all (so CSS is a lot like
life for me).

After much poking in your CSS (with the Web Dev Toolbar addon in FF) and
trial-and-error, I came up with the theory that the jumping is from
space being made for the imagetext, which you then position absolutely.
Now, it seems as though that shouldn't happen, because your
absolutely-positioned element should be out of the normal flow, and
shouldn't affect the layout of other elements. But it seemed to anyway.

Your only rule for .imagetext is display:none, but it's not absolutely
positioned, so I thought maybe if I "positioned" it (even though it's
not displayed), it might stop the jumping. This is also stupid, because
display:none ought to have no effect on the layout (I thought) and in
http://www.w3.org/TR/CSS21/visuren.html#propdef-display it clearly says,

/Please note that a display of 'none' does not create an invisible box;
it creates no box at all. CSS includes mechanisms that enable an element
to generate boxes in the formatting structure that affect formatting but
are not visible themselves. Please consult the section on visibility for
details./

But I can't be bothered with facts and rules, so I played some more, and
found some success. I came up with this CSS for your simplified example
at http://www.niksally.f2s.com/upload/g...line_test.html

li {display:inline; margin 5em auto;}
a span.imagetext {
position:absolute;
top:.2em; left:0em;
color:black;
visibility:hidden; }
a:hover span.imagetext {
position:absolute;
display:block;
top:.2em; left:8em;
color:blue;
visibility:visible; }

I ended up throwing display:none right out and using a visibility
toggle. You'll see I also positioned the imagetext in both the non-hover
and hover cases. (The colors aren't important when vis is hidden, but it
was interesting to have them during my tests.)

So in your real main page at
http://www.niksally.f2s.com/upload/gallery/gallery.html , try replacing
display:none with visibility:hidden, and adding any positioning that
seems necessary to make it work. Also add visibility:visible; to the
hover selectors.

Does *that* help you?

--
John
Nov 23 '06 #5
Nik
John Hosking wrote:
>Thank you for looking at this.
Sure, glad to, Nik. I'm learning a lot.
That's you and me both, then.
I came up with this CSS for your simplified example
at http://www.niksally.f2s.com/upload/g...line_test.html

li {display:inline; margin 5em auto;}
a span.imagetext {
position:absolute;
top:.2em; left:0em;
color:black;
visibility:hidden; }
a:hover span.imagetext {
position:absolute;
display:block;
top:.2em; left:8em;
color:blue;
visibility:visible; }

I ended up throwing display:none right out and using a visibility
toggle. You'll see I also positioned the imagetext in both the non-hover
and hover cases. (The colors aren't important when vis is hidden, but it
was interesting to have them during my tests.)

So in your real main page at
http://www.niksally.f2s.com/upload/gallery/gallery.html , try replacing
display:none with visibility:hidden, and adding any positioning that
seems necessary to make it work. Also add visibility:visible; to the
hover selectors.

Does *that* help you?
I've got the simplified version working with visibility:hidden, as you
suggested. It's at
http://www.niksally.f2s.com/upload/g...test_pass.html

I had a brief play with the 'proper version', but not enough to et it
working, nor enough to say that it won't. I think it may be important
to set the position:absolute on the a element rather than just on the
a:hover. I'll post back when I've had a proper look.

Thanks again,

Nik
Nov 24 '06 #6
Nik
John Hosking wrote:
>
So in your real main page at
http://www.niksally.f2s.com/upload/gallery/gallery.html , try replacing
display:none with visibility:hidden, and adding any positioning that
seems necessary to make it work. Also add visibility:visible; to the
hover selectors.

Does *that* help you?
Great. Amended & uploaded. IFAICT, everything now works. I haven't
tested in IE7 yet, but I'm hopeful.

If anyone fancies exploring more CSS popups, I'm confused by the following:

www.niksally.f2s.com/upload/html.html
www.niksally.f2s.com/upload/gallery.html
www.niksally.f2s.com/upload/detail.html

All the above have CSS popups below the title. These all work well
using Meyer's method.

The gallery.html file requires the use of visibility:hidden in the LH
sidebar, as kindly discovered by John in this thread.

detail.html required me to use the * html hack to give IE6 different
absolute positions for the .imagetext class pop-ups in the LH sidebar,
but worked perfectly well with the display: property.

I started these pages knowing next to nothing about CSS, and I've
learned a lot. I also think I know less than I did before I started.
Does it ever get better?!

Nik
Nov 24 '06 #7
In article <ek**********@gemini.csx.cam.ac.uk>, Nik <ne**@invalid.com>
wrote:
I started these pages knowing next to nothing about CSS, and I've
learned a lot. I also think I know less than I did before I started.
Does it ever get better?!
Get any better? Not as far as I can tell. I now know heaps less about
CSS than when I started 4 years ago. I am however a lot quicker at
making changes and following their effects.

I do have much better CSS tools now, albeit used infrequently. Plus I
sometimes think I understand more parts of what people like Russ Weakley
and John Allsopp are saying when they give presentations at conferences.

--
http://www.ericlindsay.com
Nov 24 '06 #8

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

Similar topics

3
2899
by: Baby Blue | last post by:
I have 2 codes below to grap data from another site. I use them to get the data from one News site. However, when I click on some link inside (such as :...
4
15053
by: Jorntk | last post by:
I have css in a folder name css. so how can this .css file read a pics file from another folder eg, pics/a.jpg. Both css folder and pics folder are located in a folder named project. I know i...
22
4936
by: Daniel Déchelotte | last post by:
Hi, Once I was happy with my new deezign, I noticed how bad it breaks in IE (all versions I tried). Since IE7 didn't give acceptable results, I wrote a simplified style that I would fetch to IE....
21
20595
by: Dan V. | last post by:
I have tried a number of things including preloading, but the background image (water tile in header) in IE 6 will not display where other browsers will....
4
38847
by: bissatch | last post by:
Hi, I would like to be able to create a CSS class that has all the same property values as another class but additional ones too. Instead of having to rewrite the same property values again, can...
6
1425
by: phil-news-nospam | last post by:
Here is another attempt at making some HTML/CSS (e.g. not image) buttons. Because I've managed to avoid the things that tend to be problems, it has mostly worked. I also went back to doing tables...
3
4722
by: deduction | last post by:
How do I assign one class to another? Such as ..class_a { .class_b }
3
1907
by: JakDaniel | last post by:
is it possible, create a selector as alias of another selector... (maybe) in another stylesheet file? ex: html page .... <link rel="stylesheet" type="text/css" href="style1.css" /> <link...
1
1384
by: designchemist | last post by:
Is is possible to have one style sheet (sheet1.css) that has a class of .titleText inherit the class that is in another stylesheet (sheet2.css)? Something like... .titleText { url: sheet2.css,...
4
1927
by: Andy Dingley | last post by:
Another thread <http://groups.google.co.uk/group/alt.www.webmaster/msg/ e7d125cdff1ae2a2> linked to an accessibility checker at this site <http://wave.webaim.org/index.jsp> In their own...
0
7121
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
6993
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
7162
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
7197
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...
1
6881
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
7375
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
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1411
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 ...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.