Css help need for changing img box to code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acctman
    Confirmed User
    • Oct 2003
    • 2840

    #1

    Css help need for changing img box to code

    Hi, can someone help me with changing these sets of image boxes into css.

    set 1: five boxes in a row same distance apart with the brownish color being the background like this. [brown 1-2px [pic insert] 1-2px brown]

    set 2: single cream color box with border. [border [pic insert] border] cream color is the background, no space before border and pic insert

    thanks in advance


    Code:
    http://pspdump.com/boxes.jpg
  • viki
    Confirmed User
    • Jan 2005
    • 2640

    #2
    I'm not sure if I understand completely, but here's how to do it for what I think you mean (which would just be borders around images):

    In between your <style> tags:
    .border1 {border: 2px solid #color;}
    .border2 {border: 1px solid #color;}

    where #color is the hex value of the color you want the border to be.
    then, to put it around the image, do this:

    <img src="whatever.jpg" class="border1"> for the 2 pixel border
    <img src="whatever.jpg" class="border2"> for the 1 pixel border

    viki [at] realsexcash [dot] com
    228 263 454

    Comment

    • ungratefulninja
      Confirmed User
      • Apr 2006
      • 682

      #3
      You could do something like the following, and just adjust margins and padding to achieve desire effect:

      .brownsquare {
      background: #colorcode;
      padding: 2px;
      margin: 2px;
      }

      .creamsquare {
      background: #colorcode;
      border: 1px solid #colorcode;
      padding: 2px;
      }


      <img src="image.jpg" class="brownsquare">
      <img src="image.jpg" class="creamsquare">

      Comment

      • acctman
        Confirmed User
        • Oct 2003
        • 2840

        #4
        thanks... everything worked

        Comment

        Working...