#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    35
    Rep Power
    12

    Question about <img src=""> in CSS


    Please help me with a couple of questions about following style sheet element. The url('blue_field.jpg') form is strange to me. Can this be rewritten in <img src=""> form? Any reason why not? Could I write
    background: <img src="/pic/blue_field.jpg">;
    Also, what is (repeat-y top left) ?? I have never seen this either.
    Thank you.
    Ed Shaw
    -----------------------css-----------------------------
    Links {
    background: url('bluefield.jpg') repeat-y top left;
    padding: 10px;
    margin-top: 180px;
    width: 150px; font-style:normal; font- variant:normal; font-weight:normal; font-size:10px;
    font-family:verdana, sans-serif
    }
    -----------------------css-------------------------
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    10
    Rep Power
    0
    I do not think you can write
    background: <img src="/pic/blue_field.jpg">;

    url(LINK) is just the syntax used in CSS.
    LINK is what you put in your src attribute in your image tag.
    Works the same way.

    (repeat-y top left) that is just setting up the attributes for
    the bg-image. It will repeat in the y direction and be aligned
    top-left. The background attribute is a shorthand attribute
    for five other seperate attibutes. They are
    background-attachment, background-color, background-position, background-image, and background-repeat.
  4. #3
  5. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    the background css2 specs;
    http://www.w3.org/TR/CSS2/colors.html#q2
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    35
    Rep Power
    12

    Image link in css


    Thank you, chowmein, for your kind assistance.
    I understand now.
    Ed





    Originally Posted by chowmein
    I do not think you can write
    background: <img src="/pic/blue_field.jpg">;

    url(LINK) is just the syntax used in CSS.
    LINK is what you put in your src attribute in your image tag.
    Works the same way.

    (repeat-y top left) that is just setting up the attributes for
    the bg-image. It will repeat in the y direction and be aligned
    top-left. The background attribute is a shorthand attribute
    for five other seperate attibutes. They are
    background-attachment, background-color, background-position, background-image, and background-repeat.

IMN logo majestic logo threadwatch logo seochat tools logo