Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS div border color

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #149747
    gordonsa
    Participant

    Hello

    I am trying to create a div to make a social box with a border width of 9px and a border color of red, and within that div slightly smaller divs with a border width of 1px and a border color of grey to house my social buttons.

    My HTML is:

    <div>
      <p>
        Follow EntirePersonal Injury
      </p>
    
      <div>
        <a href="http://plus.google.com/112315720353742179078">Entire Injury</a> on <img src="images/google-plus.jpg" width="26" height="26" alt="Google +" /> 
    
        <div>
        </div>
    
      </div>
    
      <div>
        <a href="http://"> </a>
      </div>
    
      <div>
        <div>
        </div>
      </div>
    
      <div>
    
      </div>
    
      <div>
    
      </div>
    </div>
    

    My CSS is:

    } .socialdiv{ width:265px; padding:6px; border-width:9px; margin:6px; border-color: #F00; } .socialitem{ width:255px; padding:1px; border-width:1px; border-color: #666; margin:1px; } .follow { font-weight: bold; }
    

    Which results in the box at entirepersonalinjury.com/index2.html with no borders on either divs.

    Could someone please point out my errors? Thanks a lot in advance!!

    #149923
    Paulie_D
    Member

    I had to strip out the embedded JS to get the the code to render properly here.

    It might be better for you to make a Codepen for us to look at.

    I am wondering why none of the divs have classes attached to them in your HTML.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.