how do i add a background image to a login box

Discussion in 'HTML & Website Design' started by horseygirl, Jan 20, 2011.

  1. #1
    how do i add a background image to a login box

    i want one like the wordpress login or a cool alternate

    my code:

     
    horseygirl, Jan 20, 2011 IP
  2. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #2
    This is the CSS code from the WP login form, there is no background image.

    
    form{margin-left:8px;padding:16px 16px 40px 16px;font-weight:normal;-moz-border-radius:11px;-khtml-border-radius:11px;-webkit-border-radius:11px;border-radius:5px;background:#fff;border:1px solid #e5e5e5;-moz-box-shadow:rgba(200,200,200,1) 0 4px 18px;-webkit-box-shadow:rgba(200,200,200,1) 0 4px 18px;-khtml-box-shadow:rgba(200,200,200,1) 0 4px 18px;box-shadow:rgba(200,200,200,1) 0 4px 18px;}
    
    Code (markup):
    Add this to your CSS and style it a little bit to suit your needs.
     
    CSM, Jan 20, 2011 IP
  3. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #3
    add this on your css
    
    .p4{
    background: url("image.jpg") no-repeat; [COLOR="red"]<-- whichever background you want to use the file name with path [/COLOR]
    }
    
    Code (markup):
     
    radiant_luv, Jan 20, 2011 IP
  4. horseygirl

    horseygirl Well-Known Member

    Messages:
    534
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    143
    #4
    ummm ot working

     
    horseygirl, Jan 21, 2011 IP
  5. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #5
    Do you have an URL where we can see the result?
     
    CSM, Jan 21, 2011 IP
  6. horseygirl

    horseygirl Well-Known Member

    Messages:
    534
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    143
    #6
    sorry deleted it now. but all it did was place the image behind it with th ebox over the top. im looking to make a login box thats all that looks cool
     
    horseygirl, Jan 21, 2011 IP
  7. davmillar

    davmillar Peon

    Messages:
    12
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Then you'll want to modify the actual style of the box and the elements with CSS.

    First, I suggest getting rid of the border on the table.

    Then, try adding this in your CSS:
    .p4 input { background:#fff; color:#666; padding:2px 5px; margin:0; border:1px solid #666; -moz-border-radius:7px;-khtml-border-radius:7px;-webkit-border-radius:7px;border-radius:7px; }
      .p4 input.btn { background:#666; color:#fff; cursor:pointer; }
    Code (markup):
    That should be a good start for the inputs, but you'll want to brush up on CSS and play with it until you get it looking how you like.
     
    davmillar, Jan 21, 2011 IP
  8. horseygirl

    horseygirl Well-Known Member

    Messages:
    534
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    143
    #8
    ok will try...

    most of my css have # in front?
    also ho do i delete the border?
     
    horseygirl, Jan 22, 2011 IP