Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 18th, 2007, 12:35 AM
mattsplatw@gmail.com
Guest
 
Posts: n/a
Default HTML/CSS Problem

Hi -

I have an incredibly vexing problem in a website I'm designing for my
research lab. I have spent two days trying one CSS tweak after
another with no results.

Basically, I have a members directory and when the name is moused
over, a picture of the member is displayed elsewhere on the page.
This is accomplished by making a div visible and works fine.

The problem is that when the picture becomes visible, it expands the
width of the table cell it is in despite being half its width. The
expansion looks to be just a few pixels, but it is distracting and
undesirable. I'd like to keep the table cell its current size or even
make it smaller, so making it bigger is not really an option.

Does anyone have any thoughts on how avoid this weird expanding table
cell? You can see the page at:

http://www.img.ufl.edu/new/memberdisp.php

Thanks,
Matt

  #2  
Old July 18th, 2007, 01:25 AM
Jim Moe
Guest
 
Posts: n/a
Default Re: HTML/CSS Problem

mattsplatw@gmail.com wrote:
Quote:
>
Basically, I have a members directory and when the name is moused
over, a picture of the member is displayed elsewhere on the page.
This is accomplished by making a div visible and works fine.
>
It does not work in Mozilla Seamonkey; no image shows. The page width
does increase, though.

This is invalid markup:
<a onmouseover="ShowContent('pic1'); return true;"
href="javascript:ShowContent('pic1')"
onmouseout="HideContent('pic1'); return true;"
href="javascript:HideContent('pic1')"show1 </a>
Multiple "href", non-standard protocol "javascript:", no fall back for
browsers with JS turned off.

It should be:
<a href="/path-to/pic1"
onmouseover="ShowContent('pic1'); return true;"
onmouseout="HideContent('pic1'); return true;"show1 </a>

The CSS property you should be using is "visibility", not "display".
"visibility:hidden" uses the same amount of space as "visibility:visible".
You can do the same thing with the ":hover" property for the <aelement
(a:hover). This way it works without JS.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
  #3  
Old July 18th, 2007, 01:35 AM
Osmo Saarikumpu
Guest
 
Posts: n/a
Default Re: HTML/CSS Problem

mattsplatw@gmail.com wrote:
Quote:
I have spent two days trying one CSS tweak after
another with no results.
I'd guess that instead of CIWAH(tml) CIWAS(tylesheets) would be a more
appropiate group. Anyways, CSS tweaks are passee.
Quote:
The problem is that when the picture becomes visible, it expands the
width of the table cell it is in despite being half its width. The
expansion looks to be just a few pixels, but it is distracting and
undesirable.
Can't see that happening (IE6, Opera 9 /Win2000). What browser, version,
platform?
Quote:
I'd like to keep the table cell its current size or even
make it smaller, so making it bigger is not really an option.
Now there is your real problem: using nested tables for layout and
wanting sizes (like insisting on using only ca. 50% of my browsers
working area).
Quote:
Does anyone have any thoughts on how avoid this weird expanding table
cell?
It's 03:30am and debugging CSS/JS/Tables is not an option, sorry.

Osmo
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles