Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2011
    Posts
    134
    Thanks
    20
    Thanked 0 Times in 0 Posts

    increase height of an image using css property

    PLease check the following link...
    http://www.texaslakesandponds.com/index_html.html
    I need help increasing the height of the planks on the left by 2 or 3px.(Home,Aerators etc)
    something similar to <img src='' height='' width=''> property in html.
    But since i am using css i am using line-height property. If i increase the height, the image gets repeated at the bottom. I tried the no-repeat property, but to no avail.
    I also tried the background-size property, but it didnt help much either. Can someone help me out with the code.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    This isn't a code issue. You need to open the image in an image editor and resize it using that. Support for background sizes at the moment is very limited.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,747
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello coding_begins,
    With a different image you could do this -
    Code:
     ul.nav-lights a{
        display:block;
        width:117px;
        line-height:26px;
        font-family:arial;
        font-size:12px;
        font-weight:bold;
        color:#FFF;
        text-decoration:none;
    	text-shadow: -1px 0 black, 0 1px black,
          1px 0 black, 0 -1px black;
        text-align:center;
        background:url(../images/aerators_new.jpg) repeat-y;
     }
    Your aerators_new.jpg doesn't really repeat well though. You should go with _Aerospace_Eng_'s suggestion.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •