define position of "box" (like: {top:30; left:20}) as def. - define "top&

merlin's picture

They have: 410 posts

Joined: Oct 1999

thank you john for your answer down there. i solved this problem.

but i already have a new one. i'd like to define a default position for this text-box. in my pattern it's defined for every box in a style sheet. like this:
#box1 {position:absolute; top:30; left:-40; width:30%; visibility:hidden}

because i have severalt boxes i'd like to define "top" as a variable, so i have to put only once the position in my code.

now my question: is it possible and how? THNX a lot!!!!!!!!!
alibababa

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Have you tried an external style sheet? This way, you would only need to write that code once but all of your documents that call it can use it.

If you haven't tried it and want more info. let us know, if you were looking more for a script instead say the word... Smiling

merlin's picture

They have: 410 posts

Joined: Oct 1999

this is my <style>-section (down here). i have 8 boxes (#box1 - #box8). and for every box i have the position defined (see down here). i'd like to define the position only once (and not 8 times), so if there is a change, it's easier to do it.
if i make it in a external style-sheet, what's the command for all the boxes (box1 - box8)?
hey thnx a lot!!!!!
alibababa
<style>
example:
#box1 {position:absolute; top:30; left:-40; width:30%}
#box2 {position:absolute; top:30; left:-40; width:30%}
</style>

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.