我想将特定的CSS应用于我的HTML中的特定标签,这是我的HTML
<div id="registration">
<div>
<label>Localisation</label>**//this is the target label to apply css**
<div id="registration_localisation">
<div>
<label>Gouvernorat</label>
<select id="registration_localisation_gouvernorat">
<option value="1">Ariana</option>
<option value="2">Ben Arous</option>
<option value="3">Bizerte</option>
</select>
</div>
<div>
<label for="registration_localisation_ville">Ville</label>
<input type="text" id="registration_localisation_ville">
</div>
</div>
</div>
<div>
<label>Annonceur</label>**//this is the target label to apply the css**
<div id="registration_annonceur">
<div>
<label for="registration_annonceur_Nom">Nom</label>
<input type="text" id="registration_annonceur_Nom">
</div>
<div>
<label for="registration_annonceur_Email">Email</label>
<input type="text" id="registration_annonceur_Email">
</div>
<div>
<label for="registration_Telephone" >Telephone</label>
<input type="text" id="registration_annonceur_Telephone">
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我使用了很多伪类,但我没有找到任何解决方案吗?
我在我的数据库中有两个表,我想加入这个2表来显示我的视图中的数据,但我没有找到解决方案.
这是我下面给出的第一个实体
/**
* @ORM\Entity
*/
class classified
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $classified_id;
/**
* @ORM\Column(type="integer")
*/
protected $user_id=0;
/**
* @ORM\Column(type="string")
*/
protected $firstname="null";
/**
* @ORM\Column(type="integer")
*/
protected $region_id="null";
Run Code Online (Sandbox Code Playgroud)
第二个实体:
class regions
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
*/
protected $region_id;
/**
* @ORM\Column(type="string")
*/
protected $regionname;
/**
* @ORM\Column(type="integer")
*/
protected $country_id=107;
}
Run Code Online (Sandbox Code Playgroud)
在我的控制器中,我想加入该表以获取信息.
$em = $this->getDoctrine()
->getEntityManager();
$classified = $em->createQueryBuilder()
->select('b')
->from('BlogBundle:classified', 'b')
->addOrderBy('b.classifiedaddeddate', 'DESC')
->getQuery()
->getResult();
return $this->render('BlogBundle:Page:index.html.twig', array( …
Run Code Online (Sandbox Code Playgroud)