1. #1
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    170
    Vote Rating
    1
    mike1993 is on a distinguished road

      0  

    Question Window title text alignment

    Window title text alignment


    I've created a window object and want to have it's title to be left justified.
    The problem is that page has "text-align: center" set in css used.

    I tried adding
    Code:
    bodyStyle:'text-align: left;',
    to the window's config but no luck.

    Any suggestions?
    Thanks,
    mike

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    1
    devnull is an unknown quantity at this point

      0  

    Default


    change your center rule to be specific to where it is needed so that you arent overriding all sorts of other areas.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    170
    Vote Rating
    1
    mike1993 is on a distinguished road

      0  

    Default


    That's the problem. The rule comes from yui/build/reset-fonts-grids/reset-fonts-grids.css and i do not have a control about using that file or not.

  4. #4
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Quote Originally Posted by mike1993 View Post
    That's the problem. The rule comes from yui/build/reset-fonts-grids/reset-fonts-grids.css and i do not have a control about using that file or not.
    I don't understand your problem? Include a css file after the core files to put any overrides you need?

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    51
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    But the title of any Panel is left justified anyway, so what is the OP on about?

  6. #6
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    170
    Vote Rating
    1
    mike1993 is on a distinguished road

      0  

    Default


    Of course I can do this (add overriding rule) and it would affect the whole page.
    I was just looking for "localized" config setting that would be applicable to my window widget only.


    Animal, that YUI's reset-fonts-grid.css (specifically grid part) sets body's text-align to 'center' and Ext.Panel does not defines text alignment explicitly. Hence... undesired alignment in my case.

    I guess, new rule for the doc is the only way to go..

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    51
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Are we talking about different things?

    Window titles are left justified.

    http://extjs.com/deploy/dev/examples/window/hello.html

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    There is also a style config option which you can use:
    Code:
    style:'text-align:left;'
    But, personally, I would fix this with a css rule and not with element styles:
    Code:
    .x-window {text-align:left;}

  9. #9
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    170
    Vote Rating
    1
    mike1993 is on a distinguished road

      0  

    Thumbs up


    Condor, that did the trick!

    Animal, we are talking about the same thing. text-align: left is default behavior of the browser, isn't it? So, window is just using browser's default style.
    But in this particular case I have
    Code:
    body {text-align: center;}
    set in one of the css files used on this page. (not my doing and out of my control).

    Anyway, it's all good now.

    Thank you guys!

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,503
    Vote Rating
    51
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Ew! Who did that?