Re: CSS-positioning with top and bottom



Hi

"Spartanicus" <invalid@xxxxxxxxxxxxxxx> wrote:
"Wrapping" the image in a div won't help.

I tried it and the surprising result is, that wrapping the image in the div
leads to the intended behaviour in Firefox and Opera but not in IE:
http://workflow.gopublic-solutions.de/test.html

What you effectively are trying to do is alter the replaced element's
used value for height. Using positioning for that strikes me as bizarre.
The rules for a situation like that are here:
http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height
this refers to
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height
note that an image has an intrinsic height

Thank you for these resources. If I read them correctly, implicitly defining
the height of an object by setting values for top and bottom works, but only
if the element has no intrinsic height. If an element has an intrinsic
height, the given value for bottom is ignored and replaced by the given
value for top plus the intrinsic height.

It is difficult to advise on how to achieve what you want since you
appear to be doing something very strange. More info on what you are
actually trying to achieve is needed.

Ok, I'm sorry for that. What I'm trying to achieve is a vertical shadow,
that starts 74 px below the upper border of the browser window and ends at
the bottom. I originally tried to do this with an image that has a height of
1 px and is dynamically stretched to the necessary height. But as this works
only in Firefox, I'm now going to replace the img tag with a div tag, that
uses the image as background and repeats it along the y-axis:
http://workflow.gopublic-solutions.de/test2.html
This seems to work in all newer browsers.
Thank you again for your help,
Simon


.



Relevant Pages

  • Re: #top anchor doesnt work in FF
    ... work with Firefox. ... the DIV tag as the "top" element. ... The solution is to take the ID off the DIV and stick it in the anchor: ...
    (alt.html)
  • and image question
    ... In firefox, I keep getting a couple of pixels space at the bottom of my divs ... I have a div with an image that should fill the ...
    (alt.html)
  • calculating the height of a dynamically generated table
    ... I am created a table dynamically and I have wrapped it in a div tag so that ... property to the div. ... I dont want the user to be able to scroll vertically so ... bottom of the table. ...
    (microsoft.public.dotnet.general)
  • Re: div tag help
    ... I want a div area that goes across the top of the page (which I can ... don't go "all the way to the bottom of the page" if the content is ... leans on ones page down button, because said browser can't go down any more. ... Where is the bottom of the "page" for an absolutely positioned div element? ...
    (alt.html)
  • Re: A rotation of only 120 degrees
    ... So each team would play 7-9 games per season, ... Bottom 2 down from Division 1 ... Each division winner up from Div 3. ... Winners up from each Div 4. ...
    (rec.sport.soccer)