[thelist] positioning a DIV nested within an A

Ben Yates byates at emich.edu
Tue Sep 14 16:03:23 CDT 2004


Just as an addendum, it's worth mentioning that the spans in question 
won't be visible at all in firefox (or other newish non-IE browser -- 
I'm filtering fixed positioning to those browsers, so no scrollbars) 
unless the resolution's at least 1024x768 and the window's maximized (or 
close to it).

Ben Yates wrote:

>
>> Well, you can't nest a DIV inside an A, so you're off on the right foot.
>>  
>>
> Oops.  Changed to a span (with display: block).
>
> The idea is to have the interior span far, eyeball-wise, from its 
> parent A; they'll still be linked via rollovers.  It's easiest just to 
> look at the link:
>
> http://people.emich.edu/byates/bluehair/
>
> I've positioned them using pixels, but this won't do at all -- the 
> page layout is fluid, and I want their position to change with the 
> window size.  Easy enough to do normally -- just specify right: 20px 
> (or however far from the right side of the screen) but in this case 
> they insist on measuring from the right edge of the parent element -- 
> the a tag -- rather than the right edge of the topmost ancestor 
> element.  (One possible fix I've thought of is to redefine the menu 
> width, and hence the a tag width, in terms of percentages, then define 
> the span position in (absurdly large -- 1000%?) percentage terms as 
> well: the menu will expand and contract, and therefore so will the 
> span.  This'll play havok with my layout, though, and may not work at 
> all, so I haven't tried it yet.)




More information about the thelist mailing list