On Mon, Oct 28, 2013 at 2:53 PM, Olemis Lang <[email protected]> wrote:

> On Mon, Oct 28, 2013 at 3:20 PM, Ryan Ollos <[email protected]>
> wrote:
>
> > On Mon, Oct 28, 2013 at 12:59 PM, Olemis Lang <[email protected]> wrote:
> >
> > > On Sun, Oct 27, 2013 at 8:41 PM, Ryan Ollos <[email protected]>
> > > wrote:
> > > [...]
> > >
> > > >
> > > > I suppose we could resolve your issue by adding an `id` to the first
> > > > div.container and modifying the CSS: .container:first-child ->
> > > > .container#id. It seems like the problem you report could be fairly
> > > common
> > > > when someone tries to embed Bloodhound within a site.
> > > >
> > >
> > > isn't div.container:first enough to select that element ?
> >
> >
> > :first is a jQuery selector, but I don't think it is a CSS selector.
> >
>
> sorry ... :first-child
> http://www.w3schools.com/cssref/sel_firstchild.asp


It doesn't work per the experimentation I've done and my understanding of
how :first-child works. Your proposal would work if :first-child selected
the first div.container element regardless of whether it had previous
siblings, but :first-child selects the element only if it is the first
child of its parent. The issue is that the .container element to which the
styling is applied is not the first-child of its parent once he inserts
additional content.

Reply via email to