Web Analytics Made Easy -
StatCounter problem positioning image using div - CodingForum

Announcement

Collapse
No announcement yet.

problem positioning image using div

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem positioning image using div

    Is it possible to assign a background image or any image to <div> using css?????

    Thanks in advance,
    chaits

  • #2
    yes.

    background-image:url(myimage.gif);
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

    Comment


    • #3
      Yes, it is.

      http://www.w3schools.com/css/css_background.asp
      bonrouge

      Comment


      • #4
        Thanks but there is one more problem

        I tried what u said and it worked too.Thanks 4 that.But facing one more problem
        the text i am trying to put in the div container does not come in the center of the background image..whereas when i use table instead it does. Can any1 help me out y is this happening n what is the solution for the same?

        Thanks again,
        chaits

        Comment


        • #5
          http://www.w3schools.com/css/pr_text_text-align.asp
          bonrouge

          Comment

          Working...
          X