小编m4t*_*1t0的帖子

垂直对齐锚内的文本

我有这个HTML:

<a href="href" class="my-a-class>
    <img alt="alt" src="/path/to/image.jpg" class="my-img-class" />&nbsp;My text
</a>
Run Code Online (Sandbox Code Playgroud)

我需要垂直对齐"我的文字"而不影响锚点中的图像.我无法添加任何HTML标记,我只需要使用CSS.有什么建议吗?

html css

12
推荐指数
1
解决办法
1万
查看次数

doctrine2查询生成器中的子查询出错

我有一个子查询的查询:

$query = $this->getEntityManager()->createQueryBuilder();
    $subquery = $query;
    $subquery
        ->select('f.following')
        ->from('ApiBundle:Follow', 'f')
        ->where('f.follower = :follower_id')
        ->setParameter('follower_id', $id)
    ;

    $query
        ->select('c')
        ->from('ApiBundle:Chef', 'c')
        ->where('c.id <> :id')
        ->setParameter('id', $id)
    ;
    $query
        ->andWhere(
            $query->expr()->notIn('c.id', $subquery->getDQL())
        );

    return $query->getQuery()->getResult();
Run Code Online (Sandbox Code Playgroud)

我收到这个错误:

[Semantical Error] line 0, col 116 near 'f, ApiBundle:Chef': Error: 'f' is already defined.
Run Code Online (Sandbox Code Playgroud)

我找不到错误的原因,别名f只定义了一次.有什么建议?

php symfony doctrine-orm

5
推荐指数
1
解决办法
7139
查看次数

标签 统计

css ×1

doctrine-orm ×1

html ×1

php ×1

symfony ×1