A place where the Joyent community can gather, help each other out, and stay informed.
You are not logged in.
I have a website with fluid layout (that it stretches to the width of the user's screen). sIFR stretches to the width of the screen (for example, if it was in a table, it would stretch to the end of the table, horizontally).
Is there anyway of getting each instance of sIFR to only be as wide as the text it has in it?
The problem is that once it has secured a width, it does not change (if a user resizes his window) until the page is refreshed.
Offline
Not in sIFR 2, no. It's something I'm looking into for the new version.
Offline
I had the same problem as this in firefox, after a lot of looking around for a solution but none to be found I came up with a dirty little workaround that seems to work in most browsers. The only place I can see this being a no go is when you need to use very long headings etc. as it will clip your text.
In the screen CSS:
.sIFR-replaced {
overflow:hidden; /* clips the absolutely positioned embed element. */
position:relative; /* Allows you to position the embed tag absolute. */
visibility:visible !important;
}
.sIFR-replaced embed {
position:absolute; /* places the embed element outside the document structure to allow for clipping. */
}
Like I said its dirty but it may serve its purpose for others, it got me out of trouble.
Cheers!
Last edited by Nathan (2006-01-20 03:59:00)
Offline