Or if you want to keep the UL rather than using DIVs, mark any
leftover LIs with class="leftover" and center them.
so markup would be something like:
<ul>
<li>...</li>
<li>...</li>
<li>...</li>
<li>...</li>
<li>...</li>
<li class="leftover">...</li>
<li class="leftover">...</li>
</ul>
and CSS would then be:
ul {
text-align:center;
}
ul li {
float:left;
width:250px;
height:250px;
text-align:left;
}
ul li.leftover{
float:none;
display:inline-block;
}
On Oct 17, 8:29 am, Yehonatan Daniv <
maggotf...@gmail.com> wrote:
> oh, 1 mistake
>
> .row {width: 960px; text-align:center; clear:both;}
> .col_center {width: 650px;margin:0 auto;}
> .col_left, .col_right {float:left; width: 48%;}
>
> ~Y
>
> On Sun, Oct 17, 2010 at 8:26 AM, Yehonatan Daniv <
maggotf...@gmail.com>wrote:
>
>
>
> > But of course, CSS must go along with proper markup formation. That's where
> > proper styling starts.
>
> > For a grid it's recommended to use div elements.
>
> > you could implement it like:
>
> > <div class="row">
> > <div class="col_left"></div>
> > <div class="col_right"></div>
> > </div>
> > <div class="row">
> > <div class="col_center"></div>
> > </div>
>
> > and style it with:
> > .row {width: 960px; text-align:center; margin:0 auto;clear:both;}
> > .col_center {width: 650px;}
> > .col_left, .col_right {float:left; width: 48%;}
>
> > or you could even do it with just 4 div elements if your a minimalist.
> > where the top row contains it all, and you apply the clear on the col_right
> > div.
>
> > hope this helps.
>
> > cheers,
> > ~Y
>
> > On Sun, Oct 17, 2010 at 1:00 AM, Imri Goldberg <
lorgan...@gmail.com>wrote:
>
> >> What do you mean?
> >> The markup can be as simple as
> >> <ul> <li /> <li /> <li /> </ul>.
> >> With this, create a grid of 2x2, where the only element on the third row
> >> is center aligned.
>
> >> Like so
> >> <ascii art>
> >> [] []
> >> []
> >> </ascii art>
>
> >> Is this sufficient, or should I write something more concrete?
>
> >> By the way, thanks for the reply at such an hour :)
> >> Cheers,
> >> Imri
>
> >> On Sun, Oct 17, 2010 at 12:54 AM, Idan Gazit <
i...@pixane.com> wrote:
>
> >>> Can you supply an isolated example of the markup?
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "PyWeb-IL" group.
> >>> To post to this group, send email to
pywe...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>>
pyweb-il+u...@googlegroups.com<pyweb-il%2Bunsubscribe@googlegroups.c om>
> >>> .
> >>
http://plnnr.com/- automatic trip planning
> >>
http://www.algorithm.co.il/blogs/
> >> --------------------------------------
> >> -- insert signature here ----
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "PyWeb-IL" group.
> >> To post to this group, send email to
pywe...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >>
pyweb-il+u...@googlegroups.com<pyweb-il%2Bunsubscribe@googlegroups.c om>
> >> .