Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Web Design Lobby Forum for general web design issues not specific to scripting or graphics.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 02-16-2004, 04:27 PM   #1 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
IE Dynamic CSS position:fixed; cross-browser solution by LJ

It's the best fix for IE not supporing the CSS property "position:fixed;"...

I done an alternative CSS+Dynamic Properties (IE only) solution to make IE do position fixed, and no extra code needed on the element itself!

it's all in the CSS, but scripts probably still have to be enabled in the browser.

IE5+ I think.

check it out the IE version of position:fixed; here!
http://dev.jdenny.co.uk/css/ie_fixed.html

*edit* updated to include a fix for background-position: fixed;
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-16-2004, 05:59 PM   #2 (permalink)
Inactive
 
Join Date: 10-13-03
Posts: 275
iTrader: 0 / 0%
Latest Blog:
None

Distorted is on the right pathDistorted is on the right path
That's cool. Nice find.
Distorted is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-16-2004, 06:04 PM   #3 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
Find?

what u mean find?

I never seen this anywhere else I had to make it!!!
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-16-2004, 07:39 PM   #4 (permalink)
Inactive
 
Join Date: 01-28-04
Posts: 84
iTrader: 0 / 0%
Latest Blog:
None

Elysium is liked by many
Send a message via ICQ to Elysium
Can i use for a bg image?
Elysium is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 03:46 AM   #5 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
I don't know, try it
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 07:23 AM   #6 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
It sort of works I think, not finished testing.
I trying to add a patch to the background effect: http://www.meyerweb.com/eric/css/edg...iral/demo.html
But the major problem comes from style rules cascading and so measurements are applied to the parent elements depending on how the CSS selector is written.
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 08:58 AM   #7 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
OK well it would be nice to do it all in CSS (+MSIE expression()s ) but it would be easier in JavaScript...

Does anyone know any mroe about expression() for setting CSS property values?

Specifically I want to know how to reference the current element being worked on by the browser...
for example:
If I hade this HTML
[code:1:d48ef44df6]
<ul id="nav">
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
<li>list item 4</li>
</ul>[/code:1:d48ef44df6]
then in my css I wanted to give each <li> a background image with a position that is 0-h where h is the <li>'s distance from the top of the page (for sake of argument I have a javascript funciton to work out h called getH(oElement) and it takes the element as a parameter)
[code:1:d48ef44df6]
#nav li {
background-image: url('my_bg.gif');
background-position: expression("0 "+getH({reference to current element}) );
}
[/code:1:d48ef44df6]
{reference to current element} is the thing I need, it is a reference to the <li> element that the CSS is currently working on.

having access to {reference to current element} would save me having to do this:
[code:1:d48ef44df6]<ul id="nav">
<li id="nav_item_1">list item 1</li>
<li id="nav_item_2">list item 2</li>
<li id="nav_item_3">list item 3</li>
<li id="nav_item_4">list item 4</li>
</ul>
<style>
#nav li {
background-image: url('my_bg.gif');
}
#nav_item_1 {
background-position: expression("0 "+getH(document.getElementById('nav_item_1')) );
}
#nav_item_2 {
background-position: expression("0 "+getH(document.getElementById('nav_item_2')) );
}
#nav_item_3 {
background-position: expression("0 "+getH(document.getElementById('nav_item_3')) );
}
#nav_item_4 {
background-position: expression("0 "+getH(document.getElementById('nav_item_4')) );
}
</style>[/code:1:d48ef44df6] which is obviously too much code and too much maintenance.
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 09:03 AM   #8 (permalink)
Inactive
 
Join Date: 10-13-03
Posts: 275
iTrader: 0 / 0%
Latest Blog:
None

Distorted is on the right pathDistorted is on the right path
By nice find, I mean that you had to find the super uber cool inspiration to think of it.
Distorted is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 09:20 AM   #9 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
my apolodies, it appears to be the first thing I tried: you can use the "this" special word used in JavaScript - for some reason the first time I tried it, it didn't seem to work!
So anyway {reference to current element} = this
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 09:22 AM   #10 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
Quote:
Originally Posted by Distorted
By nice find, I mean that you had to find the super uber cool inspiration to think of it.
oooh right! hehehe i'll belive ya!
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 10:27 AM   #11 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
OK check it out I've updated the fix for backgrounds as well...
http://dev.jdenny.co.uk/css/ie_fixed.html
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-17-2004, 11:30 PM   #12 (permalink)
Inactive
 
Join Date: 10-13-03
Posts: 275
iTrader: 0 / 0%
Latest Blog:
None

Distorted is on the right pathDistorted is on the right path
Wow, it's really improved. Now it doesn't skip like it used to.

This reminds me, I need to learn javascript.
Distorted is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-01-2004, 10:30 AM   #13 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
I found out how I stopped it skipping and wobbling!

put this CSS in your page for any CSS IE fixed poistion fix you want to use:
[code:1:ddc912613d]body {
background-image: url(false_url);
background-attachment: fixed;
}[/code:1:ddc912613d]
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-03-2004, 01:16 PM   #14 (permalink)
Inactive
 
Join Date: 12-27-03
Location: Russia, Nizhny Novgorod
Posts: 116
iTrader: 0 / 0%
Latest Blog:
None

Vulko is liked by many
Send a message via ICQ to Vulko
LazyJim, in this situation it's possible to use position: absolute i think.
Vulko is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-03-2004, 05:23 PM   #15 (permalink)
Inactive
 
Join Date: 10-13-03
Posts: 275
iTrader: 0 / 0%
Latest Blog:
None

Distorted is on the right pathDistorted is on the right path
No, position absolute and fixed are two totally different things.

Absolute just makes something a certain number of pixels from the edges when the page loads, but fixed makes that same thing stay, even if the page is scrolled.
Distorted is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make your site cross browser compatible in 5 steps OnyxDesign Web Design Lobby 7 03-27-2008 08:54 AM
fixed position for fireworks html in a table lajones3 Coding Forum 0 12-19-2007 03:26 PM
cross-browser fly-in ads script johnbraduly Coding Forum 1 08-22-2007 05:30 AM
Cross Browser Compatibility Problem designs12901 Web Design Lobby 6 03-20-2007 07:03 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:06 PM.
© Copyright 2008 V7 Inc