Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Window title text alignment

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    179
    Vote Rating
    1
      0  

    Question 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
    3
      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
    179
    Vote Rating
    1
      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
    8
      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
    Bédoin/Redwood City
    Posts
    30,626
    Vote Rating
    56
      0  

    Default

    But the title of any Panel is left justified anyway, so what is the OP on about?
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  6. #6
    Sencha Premium Member
    Join Date
    Mar 2007
    Posts
    179
    Vote Rating
    1
      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
    Bédoin/Redwood City
    Posts
    30,626
    Vote Rating
    56
      0  

    Default

    Are we talking about different things?

    Window titles are left justified.

    http://extjs.com/deploy/dev/examples/window/hello.html
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    123
      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
    179
    Vote Rating
    1
      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
    Bédoin/Redwood City
    Posts
    30,626
    Vote Rating
    56
      0  

    Default

    Ew! Who did that?
    Longtime Sencha geek. Outspoken advocate of pure Javascript Views. Posts my own opinions.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •