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

RE: [ydn-javascript] grid.css text-align

Expand Messages
  • Nate Koechley
    Hello vasanth_web, The base structure of a YUI Grids page is: As you noted, grids.css initially sets BODY
    Message 1 of 2 , Oct 30, 2006
    • 0 Attachment
      Hello vasanth_web,

      The base structure of a YUI Grids page is:

      <body>
      <div id="doc"></div>
      </body>

      As you noted, grids.css initially sets BODY {text-align:center}, a
      technique that centers #doc in the viewport for some browsers.
      Please note that the very next line in grids.css sets #doc
      {text-align:left;}, the default value. Therefore, no actual content
      on the page is text-aligned center.

      I understand your desire for BODY to be unaffected by YUI CSS.
      However the alternative would be an additional nested DIV to achieve
      viewport centering for all A-grade browsers. Because using the
      text-align property on BODY minimizes the markup required, and,
      importantly, because it is declared back to default (:left) in the
      very next node, I think we made the correct trade off.

      Thanks for expressing your opinion, and please let me know any other
      thoughts you have on the topic.

      Thanks
      Nate

      Yahoo! Presentation Platform Engineering



      ________________________________________
      From: ydn-javascript@yahoogroups.com
      [mailto:ydn-javascript@yahoogroups.com] On Behalf Of vasanth_web
      Sent: Monday, October 30, 2006 8:25 AM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] grid.css text-align

      I see that the grid.css has the following

      body {
      text-align:center;
      }

      I feel the YUI should not be setting attributes for body tags...
      what
      do you think???
    Your message has been successfully submitted and would be delivered to recipients shortly.