[Javascript] variable DIV

Troy III Ajnej trojani2000 at hotmail.com
Thu Feb 12 01:16:23 CST 2009


Hi there...
I think I finally understand your problem :)
Check these lines of your css first:
 
 > margin-left: 14px; > width: 50%; /*remove this line! */ > float: left; > background-color: #ffffff; > display: inline;/*(?) not needed*/ 
 > /*merge the following to: overflow: hidden;*/ > overflow-x: hidden;  > overflow-y: hidden;
 
and try this:
 
----------------------------- 8< -------------------------------
 
var container = document.getElementById('[idName1]');// [idName1] - replace with the ID of your 3 column wrapper! 
 
var colls = [numValue];/* [numValue] - replace with the value of your fixed columns
 *  total width!  exmp.: 600, or give it some air: 612. */
var leftcol = document.getElementById('[idName2]');// [idName2] - replace with the ID of your varWidth column! 
 
 
function adjustVarWidthCol(){          var width = (container.offsetWidth - colls);          leftcol.style.width = width + 'px';          }
     adjustVarWidthCol();     onresize = adjustVarWidthCol;
----------------------------- 8< -------------------------------
*  place this script before the end of </body tag closure only *
 
Not very readable I guess, but it will do. You will probably need to
adjust the colls var value untill you get the right size..., and don't
forget the script/script tags :D
 
Regards.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                      Troy III                         progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Date: Wed, 11 Feb 2009 06:49:44 +0100> From: vkocher at wombat.ch> To: javascript at lists.evolt.org> Subject: Re: [Javascript] variable DIV> > Hello> and thanks for the feedback,> so my blog has 3 column> > at this time this is definition of the DIV code for the Leftside (MAP Side)> > #left-sidebar-wrapper (line 146)> {> margin-left: 14px;> width: 50%;> float: left;> background-color: #ffffff;> display: inline;> overflow-x: hidden;> overflow-y: hidden;> }> > I would imagine a sript checking out the size of the browser deduct > 600px (600px = the middle and right column) keep the result in a variable> to add it like this> > width: Variable;> > in this case it would not be anymore important about the sice of the > screen - some will have a samll map othe a large map!> and yes the MAP itself resize allready outmatic to the right size> > have a nice day> vincent> > > > Troy III Ajnej wrote:> > Hi Kocher,> > -yes, it is possible...> > But I Am not that sure I understand your final goal.> > Can you please first explain to us: what would you like to do with> > with that value? Since your explanation:> > > >> and add the Result to a DIV Structure?" > >> > > is not very explanatory.> > What do you mean with: and add the Result to a DIV Structure? > > > > Regards.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Date: Tue, 10 Feb 2009 22:29:21 +0100> From: vkocher at wombat.ch> To: javascript at lists.evolt.org> Subject: [Javascript] variable DIV> > Hello> i have a page with 3 column the Middle and right one have a fixed > width the Left one has a Variable Width, as large as the Browser/Screen > would be.> > It is possible to read it out with javascript how large the > Screen/Browser is deduct the px from the Middle and right Column and add > the Result to a DIV Structure?> > and how to do it?> the place this should work would be http://jetztunterwegs.blogspot.com/> and sorry i am a beginner withe javascript - so the how to do should be > easy to add to my page> > thanks a lot> have a nice day> > vincent> _______________________________________________> Javascript mailing list> Javascript at lists.evolt.org> http://lists.evolt.org/mailman/listinfo/javascript> > _________________________________________________________________> > Windows Live™: E-mail. Chat. Share. Get more ways to connect. > > http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_022009> > _______________________________________________> > Javascript mailing list> > Javascript at lists.evolt.org> > http://lists.evolt.org/mailman/listinfo/javascript> >> >> >> >> > > > _______________________________________________> Javascript mailing list> Javascript at lists.evolt.org> http://lists.evolt.org/mailman/listinfo/javascript
_________________________________________________________________
Windows Live™: E-mail. Chat. Share. Get more ways to connect. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_022009


More information about the Javascript mailing list