[thelist] Floaty CSS
Dan Parry
dan at virtuawebtech.co.uk
Thu Nov 15 17:36:05 CST 2007
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org [mailto:thelist-
> bounces at lists.evolt.org] On Behalf Of megan cauley
> Sent: 15 November 2007 18:30
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] Floaty CSS
>
> Dan,
>
> Not sure if this has been answered yet, I get the list digest...
>
> I have used this JavaScript, I found somewhere,...
> to keep 2 divs equal heights. I have also called this function multiple
> times in one document.
>
> ** <script>
> ** function setheight() {
> **
> document.getElementById('left').style.height=document.getElementById('r
> ight').offsetHeight
> ** + "px";
>
> ** }
> ** </script>
>
> ...
>
> ** <body onload="setheight();">
>
> Whatever your div id's are set to that is where ('left') and ('right')
> would be....
>
>
> hth,
>
> megan
Thanks Megan I did have a similar idea but it was going to be class-based
using a DOM collection... I decided against the method because I can be a
bit purist ;)... I was sure CSS alone could do it so decided to stick with
that route (well, I say route... It was more of a meander ending in a deep
river)
I do prefer to keep JS away from pure layout if I can at all help it :)
Again thanks... Can never have enough alternative methods
Dan
--
Dan Parry
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.15.32/1131 - Release Date: 14/11/2007
16:54
More information about the thelist
mailing list