HTML/CSS Border Around Multiple Elements -


i'm trying border around image , paragraphs items can't figure out how it. encased them in divs , added class them background color , border effects nothing. i'm shooting for: enter image description here

this html code looks section:

<div class="pair">                 <a href="gpa_calc_screen.png">                     <img src="gpa_calc_screen.png" alt""> <!--relative img path -->                 </a>                  <p>                         custom gpa calculator, , think first real app made. going georgia tech, , college in general, vital asset. although @ gt don't operate on plus/minus system, added setting in can edit if want.                 </p>         </div> 

and here css:

.pair div {     display: block;     /*padding: 5px;     clear: right;     width: 100%;     border-radius: 5px;     border-width: 3px;     border-color: red;*/     background: red; } 

you don't need add div in front of .pair when doing class without id based keep

.pair  {       border: 3px rgb(86, 10, 10) solid;       padding: 9px;       display: block;          }      <div class="pair">    <a href="gpa_calc_screen.png">      <img src="sourceofimage.png" alt""> <!--relative img path -->    </a>    <p>      text    </p>  </div> 

for bottom div need add "pair" class.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -