HighDots Forums  

Using a variable in a div style tag

alt.html.dhtml alt.html.dhtml


Discuss Using a variable in a div style tag in the alt.html.dhtml forum.



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

Default Using a variable in a div style tag - 01-04-2005 , 06:07 PM






I have a menu that stretches across the top of a series of pages, and I need
to be able to change all 8 div's absolute position. Here's the code I am
using:

<div id="layer1" style="position:absolute; width:auto; height:auto; top:1px;
left:50px">

What I need is to be able to change that 'left:50px' to the equiv of
'left:layer1_pos">

any suggestions on how to go about this??



Reply With Quote
  #2  
Old   
RF Rohrer
 
Posts: n/a

Default Re: Using a variable in a div style tag - 03-31-2005 , 05:55 PM






If the left pos is different only from page to page, you could make the
basic styels an external style sheet and override the left position within
each specific document with CSS.

If it vsries in patterns other than from page to page, then this will NOT
work and you will have to build some Javascript method to put your logic
into effect changing the left pos, where and when it is needed.

"ScooterMX" <scooter (AT) nowhere (DOT) org> wrote

Quote:
I have a menu that stretches across the top of a series of pages, and I
need
to be able to change all 8 div's absolute position. Here's the code I am
using:

div id="layer1" style="position:absolute; width:auto; height:auto;
top:1px;
left:50px"

What I need is to be able to change that 'left:50px' to the equiv of
'left:layer1_pos"

any suggestions on how to go about this??





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 - 2009, Jelsoft Enterprises Ltd.