html - CSS selections stuck -


how can select <a> tags inside these divs in css?

<div id="mydiv">     <div id="innerdiv1">         <a href="...">some link 1</a>     </div>     <div id="innerdiv2">         <a href="...">some link 2</a>     </div> </div> 

if want select a tags inside of innerdiv1 this:

#innerdiv1 { } 

there issue here though, in have multiple ids. not use same id multiple elements. instead, use class so:

<div id="mydiv">     <div class="innerdiv1">         <a href="...">some link 1</a> </div>     <div class="innerdiv1">         <a href="...">some link 2</a>     </div> </div> 

and style this:

.innerdiv1 { } 

Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -