asylum
-
Posts
55 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by asylum
-
-
this works for me in firefox
#container { margin: 0 auto; position: relative;}
-
Is there a way to do this? If so I would really like to know how. It seems like some trick of position: relative; and position: absolute; might work when combined in some crazy way that I've yet to think of. So far all my attempts have been futile.If it helps at all, I'm trying to make a menu that is composed of horizontal bars with links across them and only the right-most link shows until you hover over it then I'll have a js function that slides the bar out.Example:
+------------------------------------------------+| link1 link 2 link3...etc.......link that shows |+------------------------------------------------+
-
Thanks for the help. And I used the attribute:: because I thought the two were different. I thought the @ gave you the element with that attribute and the attribute:: would give you the actual attribute.Wouldn't a simplebackground-image: url("<xsl:value-of select="bglayer/attribute::src"/>");
do the trick? Parenthesis as far as I know are only used inside attribute values. CSS however is consireder plain text, so <xsl:value-of> is the way to go.Oh, and just a tip. Why don't you use the "@" instead of "attribute::"?
-
This is a piece of code from my .xsl file and when I try to assign the attribute src directly to background-image it works but I can't put that xsl declaration in quotes which I need to do so I decided to use a variable...but it just doesn't work...at all.
<?xml version="1.0" encoding="ISO-8859-1" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/content"><xsl:variable name="source" select="bglayer/attribute::src"/><html><head><style type="text/css">#body { background-image: url("{$source}"); position: relative; width: <xsl:value-of select="bglayer/attribute::width"/>; height: <xsl:value-of select="bglayer/attribute::height"/>;}.item { margin: 5px;}</style></head><body> <div id="body"> <xsl:apply-templates/> </div></body></html></xsl:template>
load page into div
in CSS
Posted
imho xml and xslt and js have worked very well for me to do just what you're talking about (though I also through in some formatting stuff that you wouldn't need). All this example code is here. To test it just download content.xml and content.xsd and the contents of dark/ then view content.xml on your machine with firefox (important: IE support hasn't been put in yet since I'm the only one looking at it so far and I use firefox ).Let me know if you need any questions answered regarding this code.