HighDots Forums  

css image swap

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss css image swap in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PJ
 
Posts: n/a

Default css image swap - 12-08-2003 , 04:04 PM






I'm trying to duplicate a particular image swap effect shown here:
http://css.maxdesign.com.au/listamatic/horizontal18.htm

However, I'm confused as to how the padding values are calculated and I was
hoping someone could provide a little insight. Are the padding values
contingent upon the length and size of the text? Is there a way to achieve
this effect w/out using padding values? I attempted to set display: block
on the a elements, but that caused the list items to stack on top of each
other, despite the fact that their display style is set to inline.

TIA~
PJ



Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: css image swap - 12-08-2003 , 04:54 PM






PJ wrote:

Quote:
I'm trying to duplicate a particular image swap effect shown here:
http://css.maxdesign.com.au/listamatic/horizontal18.htm

However, I'm confused as to how the padding values are calculated
Distance between edge of the image and the area of the image that the text
should appear in.

Quote:
I attempted to set display: block on the a elements, but that caused the
list items to stack on top of each other, despite the fact that their
display style is set to inline.
Of course - a block has a new line before and after it. It busts the line.


--
David Dorward <http://dorward.me.uk/>


Reply With Quote
  #3  
Old   
PJ
 
Posts: n/a

Default Re: css image swap - 12-08-2003 , 05:23 PM



Quote:
However, I'm confused as to how the padding values are calculated

Distance between edge of the image and the area of the image that the text
should appear in.

If this is the case, then how do I get one style to work for text of varying
lengths?




Reply With Quote
  #4  
Old   
David Dorward
 
Posts: n/a

Default Re: css image swap - 12-09-2003 , 01:31 AM



PJ wrote:

Quote:
However, I'm confused as to how the padding values are calculated

Distance between edge of the image and the area of the image that the
text should appear in.

If this is the case, then how do I get one style to work for text of
varying lengths?
The padding isn't related to the size of the text, the size contraints are
provided by the image. If you want to work around that, then you have to
roll into the land of nested divs -
http://dorward.me.uk/tmp/StarSlayer/background.htm (and it might be ...
tricky to persuade that to work with the rollovers.)

--
David Dorward <http://dorward.me.uk/>


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.