html - Css for child elements -


i have few pages have different structure inside parent div

<div class="post-formatting">      <p>some text            <em>                 <a href="http://example.com">click here</a>            </em>      </p>  </div> 
<div class="post-formatting">      <p>some text            <a href="http://example-2.com">click here</a>      </p>      <div>            <a href="http://example-3.com">click here</a>      </div>  </div> 
<div class="post-formatting">       <a href="http://example-4.com">click here</a> </div> 

i need set common css rule <a> tags within <div class="post-formatting">, dependless whether it's first child or not. there way that? thnx

yes. basic css. can achieve quite with:

.post-formatting {     /* style declarations here. */ } 

.post-formatting {    color: red;    font-weight: bold;  }
<div class="post-formatting">    <p>      text      <em>        <a href="http://example.com">click here</a>      </em>    </p>  </div>  <div class="post-formatting">    <p>some text      <a href="http://example-2.com">click here</a>    </p>    <div>      <a href="http://example-3.com">click here</a>    </div>  </div>  <div class="post-formatting">    <a href="http://example-4.com">click here</a>  </div>


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -