[ 3 posts ]

old.castle

  • Joined: Thu Apr 19, 2012 5:25 am
  • Posts: 6
  • Offline
  • Profile

What is the best approach for gridding multiple class or id?

Post Posted: Thu Jun 07, 2012 8:07 pm
+0-
Hi there,

Since I couldn't find anything on yui3 documentation, I kindly would like your opinion on below. What is best practices?

<div class="yui3-u-1-3" id="logo">
... content
</div>

or

<div class="yui3-u-1-3">
<div id="logo">
..... content
</div>
</div>

Regards,
Castle

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: What is the best approach for gridding multiple class or

Post Posted: Mon Jun 11, 2012 1:21 pm
+1-
That all depends on the styles you are setting on `#logo`.

If you set anything that could kill the grid (like border, padding, margin) then nesting them is the best bet.

old.castle

  • Joined: Thu Apr 19, 2012 5:25 am
  • Posts: 6
  • Offline
  • Profile

Re: What is the best approach for gridding multiple class or

Post Posted: Mon Jun 11, 2012 6:25 pm
+0-
Since I'm building the website for a third party, I will play safe and go nesting.

Thanks Dav,
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum