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

Alignment in a YUI dialog window

Expand Messages
  • vani_narayanasamee
    Hi, How to align elements in a YUI dialog window? In my dialog window by default all elements are center aligned. Thanks in Advance!!
    Message 1 of 4 , May 1, 2007
    • 0 Attachment
      Hi,

      How to align elements in a YUI dialog window?
      In my dialog window by default all elements are center aligned.

      Thanks in Advance!!
    • alexshusta
      Hi Vani, The Dialog inherits styles from the Panel class. You can override the rules in http://yui.yahooapis.com/2.2.2/build/container/assets/container.css or
      Message 2 of 4 , May 2, 2007
      • 0 Attachment
        Hi Vani,

        The Dialog inherits styles from the Panel class. You can override the rules in http://yui.yahooapis.com/2.2.2/build/container/assets/container.css or your local copy of the container.css file to set alignment etc. Specifically, if your dialog has id="VanisDialog" you'd want a rule like:

        #VanisDialog .hd, #VanisDialog .bd{
            text-align: left;
        }


        If your dialog isn't going to us an id (e.g. there will be multiple dynamically created dialogs and you want a rule for all of them) you'd use a selector like:

        .yui-dialog .hd, .yui-dialog .bd{
            text-align: left;
        }

        Ta,
        ~Alexander

        --- In ydn-javascript@yahoogroups.com, "vani_narayanasamee" <vani_narayanasamee@...> wrote:
        >
        > Hi,
        >
        > How to align elements in a YUI dialog window?
        > In my dialog window by default all elements are center aligned.
        >
        > Thanks in Advance!!
        >
      • vani_narayanasamee
        Thanks Alexander, Is ther any way to align few controls to the left and few to the right of the dialog window? Please keep me posted if you have any solution.
        Message 3 of 4 , May 2, 2007
        • 0 Attachment
          Thanks Alexander,

          Is ther any way to align few controls to the left and few to the right
          of the dialog window?

          Please keep me posted if you have any solution.



          --- In ydn-javascript@yahoogroups.com, "alexshusta"
          <alexander.shusta@...> wrote:
          >
          > Hi Vani,
          >
          > The Dialog inherits styles from the Panel class. You can override the
          > rules in
          > http://yui.yahooapis.com/2.2.2/build/container/assets/container.css or
          > your local copy of the container.css file to set alignment etc.
          > Specifically, if your dialog has id="VanisDialog" you'd want a rule
          > like:
          >
          > #VanisDialog .hd, #VanisDialog .bd{
          > text-align: left;
          > }
          >
          > If your dialog isn't going to us an id (e.g. there will be multiple
          > dynamically created dialogs and you want a rule for all of them) you'd
          > use a selector like:
          >
          > .yui-dialog .hd, .yui-dialog .bd{
          > text-align: left;
          > }
          >
          > Ta,
          > ~Alexander
          >
          > --- In ydn-javascript@yahoogroups.com, "vani_narayanasamee"
          > <vani_narayanasamee@> wrote:
          > >
          > > Hi,
          > >
          > > How to align elements in a YUI dialog window?
          > > In my dialog window by default all elements are center aligned.
          > >
          > > Thanks in Advance!!
          > >
          >
        • alexshusta
          Hey Vani, Yes, there absolutely is a way to align individual controls to the left and right. Create CSS selector rules that are applied to their id or class
          Message 4 of 4 , May 3, 2007
          • 0 Attachment
            Hey Vani,

            Yes, there absolutely is a way to align individual controls to the
            left and right. Create CSS selector rules that are applied to their id
            or class values.

            For example:
            .yui-dialog .bd{
            text-align: left;
            }
            .yui-dialog .bd input{
            float: right;
            }

            You can use CSS styles just as you normally would expect to. The
            import thing is to get your CSS selector started out correctly with
            ".yui-dialog"

            Also, if you're creating the dialog from existing markup, you can use
            inline style rules or tables to control the layout of your dialog.

            Ta~
            ~Alexander

            --- In ydn-javascript@yahoogroups.com, "vani_narayanasamee"
            <vani_narayanasamee@...> wrote:
            >
            > Thanks Alexander,
            >
            > Is ther any way to align few controls to the left and few to the right
            > of the dialog window?
            >
            > Please keep me posted if you have any solution.
            >
            >
            >
            > --- In ydn-javascript@yahoogroups.com, "alexshusta"
            > <alexander.shusta@> wrote:
            > >
            > > Hi Vani,
            > >
            > > The Dialog inherits styles from the Panel class. You can override the
            > > rules in
            > > http://yui.yahooapis.com/2.2.2/build/container/assets/container.css or
            > > your local copy of the container.css file to set alignment etc.
            > > Specifically, if your dialog has id="VanisDialog" you'd want a rule
            > > like:
            > >
            > > #VanisDialog .hd, #VanisDialog .bd{
            > > text-align: left;
            > > }
            > >
            > > If your dialog isn't going to us an id (e.g. there will be multiple
            > > dynamically created dialogs and you want a rule for all of them) you'd
            > > use a selector like:
            > >
            > > .yui-dialog .hd, .yui-dialog .bd{
            > > text-align: left;
            > > }
            > >
            > > Ta,
            > > ~Alexander
            > >
            > > --- In ydn-javascript@yahoogroups.com, "vani_narayanasamee"
            > > <vani_narayanasamee@> wrote:
            > > >
            > > > Hi,
            > > >
            > > > How to align elements in a YUI dialog window?
            > > > In my dialog window by default all elements are center aligned.
            > > >
            > > > Thanks in Advance!!
            > > >
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.