Loading ...
Sorry, an error occurred while loading the content.

RE: [ydn-javascript] Custom column widths using grids.css

Expand Messages
  • Nate Koechley
    Hi Nic, YUI Grids does not offer a built-in way to customize the width of the columns. However, the math used to define custom page widths[1] can be used to
    Message 1 of 8 , Jan 26, 2007
    View Source
    • 0 Attachment
      Hi Nic,

      YUI Grids does not offer a built-in way to customize the width of the
      columns.

      However, the math used to define custom page widths[1] can be used to
      overwrite the dimensions of the Template Presets.

      [1] http://developer.yahoo.com/yui/grids/#custom_page_width

      If you were using .yui-t1, you'd overwrite the widths and margins in this
      block of code:

      <style>
      .yui-t1 .yui-b {
      float:left;
      width:12.3207em;*width:12.0106em;}
      .yui-t1 #yui-main .yui-b{
      margin-left:13.3207em;*margin-left:13.0106em;
      }
      </style>

      ... with new numbers as necessary.

      Hope that helps,
      Thanks,
      Nate






      > -----Original Message-----
      > From: ydn-javascript@yahoogroups.com
      > [mailto:ydn-javascript@yahoogroups.com] On Behalf Of jacare1979
      > Sent: Thursday, January 25, 2007 2:21 PM
      > To: ydn-javascript@yahoogroups.com
      > Subject: [ydn-javascript] Custom column widths using grids.css
      >
      > Is there any way to specify the width of a column and then
      > let the other column take the remaining space?
      >
      > i.e. I have a custom 750px wide wrapper. Inside that, I'd
      > like to have a 280px wide sidebar and have the main section
      > be 470px wide. I can only see how to make it 1/3 (250px) or a
      > fixed 300px wide.
      >
      > Thanks in advance,
      > Nic J.
      >
      >
      >
      >
      >
    • jacare1979
      Wonderful! Thanks, Nate. ... this
      Message 2 of 8 , Jan 27, 2007
      View Source
      • 0 Attachment
        Wonderful! Thanks, Nate.

        --- In ydn-javascript@yahoogroups.com, "Nate Koechley" <natek@...> wrote:
        >
        > Hi Nic,
        >
        > YUI Grids does not offer a built-in way to customize the width of the
        > columns.
        >
        > However, the math used to define custom page widths[1] can be used to
        > overwrite the dimensions of the Template Presets.
        >
        > [1] http://developer.yahoo.com/yui/grids/#custom_page_width
        >
        > If you were using .yui-t1, you'd overwrite the widths and margins in
        this
        > block of code:
        >
        > <style>
        > .yui-t1 .yui-b {
        > float:left;
        > width:12.3207em;*width:12.0106em;}
        > .yui-t1 #yui-main .yui-b{
        > margin-left:13.3207em;*margin-left:13.0106em;
        > }
        > </style>
        >
        > ... with new numbers as necessary.
        >
        > Hope that helps,
        > Thanks,
        > Nate
        >
        >
        >
        >
        >
        >
        > > -----Original Message-----
        > > From: ydn-javascript@yahoogroups.com
        > > [mailto:ydn-javascript@yahoogroups.com] On Behalf Of jacare1979
        > > Sent: Thursday, January 25, 2007 2:21 PM
        > > To: ydn-javascript@yahoogroups.com
        > > Subject: [ydn-javascript] Custom column widths using grids.css
        > >
        > > Is there any way to specify the width of a column and then
        > > let the other column take the remaining space?
        > >
        > > i.e. I have a custom 750px wide wrapper. Inside that, I'd
        > > like to have a 280px wide sidebar and have the main section
        > > be 470px wide. I can only see how to make it 1/3 (250px) or a
        > > fixed 300px wide.
        > >
        > > Thanks in advance,
        > > Nic J.
        > >
        > >
        > >
        > >
        > >
        >
      • sridhar panneerselvam
        hi all, i m sridhar,i have attended one interview.. They asked me to write a function in javascript in a single line to concatinate the given any number of
        Message 3 of 8 , Jan 27, 2007
        View Source
        • 0 Attachment
          hi all,
           
          i'm sridhar,i have attended one interview.. They asked me to write a function in javascript in a single line to concatinate the given any number of string...
           
          here is de way...
          function concatenate (/*any number of strings*/) {
              var string = /*your one line here*/
              return string;
          }
           
           
          can any one help me in...
           
          Thanks in advance
           
          Sridhar.P


          Here’s a new way to find what you're looking for - Yahoo! Answers

        • palvadeau_damien
          Hello, I don t think that tyou can do something shorter than: function concatenate(){ var srtRet= ; for(var idx=0;idx
          Message 4 of 8 , Jan 28, 2007
          View Source
          • 0 Attachment
            Hello,

            I don't think that tyou can do something shorter than:

            function concatenate(){
            var srtRet="";

            for(var idx=0;idx<arguments.length;idx++)
            srtRet+=concatenate.arguments[idx]+" ";

            return srtRet.substring(0,srtRet.length-1);
            }

            Indeed, its seems that even if concatenate.arguments is a classical
            array and not javascript Array object. If it was you would be able
            to do :

            function concatenate(){
            return concatenate.arguments.join(" ");
            }

            I hope it will help a bit.

            Damien PALVADEAU
            -French student-

            --- In ydn-javascript@yahoogroups.com, sridhar panneerselvam
            <ajax_sridhar@...> wrote:
            >
            > hi all,
            >
            > i'm sridhar,i have attended one interview.. They asked me to
            write a function in javascript in a single line to concatinate the
            given any number of string...
            >
            > here is de way...
            > function concatenate (/*any number of strings*/) {
            > var string = /*your one line here*/
            > return string;
            > }
            >
            >
            > can any one help me in...
            >
            > Thanks in advance
            >
            > Sridhar.P
            >
            >
            > ---------------------------------
            > Here's a new way to find what you're looking for - Yahoo! Answers
            >
          • Chris
            What you CAN do is apply the .join from the Array object to the arguments array, thus in a single line: function fnConcatenate() { return Array.join.apply(
            Message 5 of 8 , Jan 28, 2007
            View Source
            • 0 Attachment
              What you CAN do is apply the .join from the Array object to the
              arguments array, thus in a single line:

              function fnConcatenate() { return Array.join.apply( null , [arguments,
              ' ']); }



              --- In ydn-javascript@yahoogroups.com, "palvadeau_damien"
              <d.palvadeau@...> wrote:
              >
              >
              > Hello,
              >
              > I don't think that tyou can do something shorter than:
              >
              > function concatenate(){
              > var srtRet="";
              >
              > for(var idx=0;idx<arguments.length;idx++)
              > srtRet+=concatenate.arguments[idx]+" ";
              >
              > return srtRet.substring(0,srtRet.length-1);
              > }
              >
              > Indeed, its seems that even if concatenate.arguments is a classical
              > array and not javascript Array object. If it was you would be able
              > to do :
              >
              > function concatenate(){
              > return concatenate.arguments.join(" ");
              > }
              >
              > I hope it will help a bit.
              >
              > Damien PALVADEAU
              > -French student-
              >
              > --- In ydn-javascript@yahoogroups.com, sridhar panneerselvam
              > <ajax_sridhar@> wrote:
              > >
              > > hi all,
              > >
              > > i'm sridhar,i have attended one interview.. They asked me to
              > write a function in javascript in a single line to concatinate the
              > given any number of string...
              > >
              > > here is de way...
              > > function concatenate (/*any number of strings*/) {
              > > var string = /*your one line here*/
              > > return string;
              > > }
              > >
              > >
              > > can any one help me in...
              > >
              > > Thanks in advance
              > >
              > > Sridhar.P
              > >
              > >
              > > ---------------------------------
              > > Here's a new way to find what you're looking for - Yahoo! Answers
              > >
              >
            • Jack Slocum
              Chris, I think what you are looking for is: function concatenate(){ return Array.prototype.join.call(arguments, ); } The arguments object isn t a true array,
              Message 6 of 8 , Jan 28, 2007
              View Source
              • 0 Attachment
                Chris, I think what you are looking for is:

                function concatenate(){
                return Array.prototype.join.call(arguments, '');
                }

                The arguments object isn't a true array, but most of the array
                functions can be apply()/call() on it using Array.prototype.

                --- In ydn-javascript@yahoogroups.com, "Chris" <altearius@...> wrote:
                >
                > What you CAN do is apply the .join from the Array object to the
                > arguments array, thus in a single line:
                >
                > function fnConcatenate() { return Array.join.apply( null , [arguments,
                > ' ']); }
                >
                >
                >
                > --- In ydn-javascript@yahoogroups.com, "palvadeau_damien"
                > <d.palvadeau@> wrote:
                > >
                > >
                > > Hello,
                > >
                > > I don't think that tyou can do something shorter than:
                > >
                > > function concatenate(){
                > > var srtRet="";
                > >
                > > for(var idx=0;idx<arguments.length;idx++)
                > > srtRet+=concatenate.arguments[idx]+" ";
                > >
                > > return srtRet.substring(0,srtRet.length-1);
                > > }
                > >
                > > Indeed, its seems that even if concatenate.arguments is a classical
                > > array and not javascript Array object. If it was you would be able
                > > to do :
                > >
                > > function concatenate(){
                > > return concatenate.arguments.join(" ");
                > > }
                > >
                > > I hope it will help a bit.
                > >
                > > Damien PALVADEAU
                > > -French student-
                > >
                > > --- In ydn-javascript@yahoogroups.com, sridhar panneerselvam
                > > <ajax_sridhar@> wrote:
                > > >
                > > > hi all,
                > > >
                > > > i'm sridhar,i have attended one interview.. They asked me to
                > > write a function in javascript in a single line to concatinate the
                > > given any number of string...
                > > >
                > > > here is de way...
                > > > function concatenate (/*any number of strings*/) {
                > > > var string = /*your one line here*/
                > > > return string;
                > > > }
                > > >
                > > >
                > > > can any one help me in...
                > > >
                > > > Thanks in advance
                > > >
                > > > Sridhar.P
                > > >
                > > >
                > > > ---------------------------------
                > > > Here's a new way to find what you're looking for - Yahoo! Answers
                > > >
                > >
                >
              • dhtml.guru
                Hey Nate, can you include this information on the yui dev site page? -andrew ... this
                Message 7 of 8 , May 16, 2008
                View Source
                • 0 Attachment
                  Hey Nate, can you include this information on the yui dev site page?

                  -andrew



                  --- In ydn-javascript@yahoogroups.com, "Nate Koechley" <natek@...> wrote:
                  >
                  > Hi Nic,
                  >
                  > YUI Grids does not offer a built-in way to customize the width of the
                  > columns.
                  >
                  > However, the math used to define custom page widths[1] can be used to
                  > overwrite the dimensions of the Template Presets.
                  >
                  > [1] http://developer.yahoo.com/yui/grids/#custom_page_width
                  >
                  > If you were using .yui-t1, you'd overwrite the widths and margins in
                  this
                  > block of code:
                  >
                  > <style>
                  > .yui-t1 .yui-b {
                  > float:left;
                  > width:12.3207em;*width:12.0106em;}
                  > .yui-t1 #yui-main .yui-b{
                  > margin-left:13.3207em;*margin-left:13.0106em;
                  > }
                  > </style>
                  >
                  > ... with new numbers as necessary.
                  >
                  > Hope that helps,
                  > Thanks,
                  > Nate
                  >
                  >
                  >
                  >
                  >
                  >
                  > > -----Original Message-----
                  > > From: ydn-javascript@yahoogroups.com
                  > > [mailto:ydn-javascript@yahoogroups.com] On Behalf Of jacare1979
                  > > Sent: Thursday, January 25, 2007 2:21 PM
                  > > To: ydn-javascript@yahoogroups.com
                  > > Subject: [ydn-javascript] Custom column widths using grids.css
                  > >
                  > > Is there any way to specify the width of a column and then
                  > > let the other column take the remaining space?
                  > >
                  > > i.e. I have a custom 750px wide wrapper. Inside that, I'd
                  > > like to have a 280px wide sidebar and have the main section
                  > > be 470px wide. I can only see how to make it 1/3 (250px) or a
                  > > fixed 300px wide.
                  > >
                  > > Thanks in advance,
                  > > Nic J.
                  > >
                  > >
                  > >
                  > >
                  > >
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.