Results 1 to 3 of 3

Thread: What is the exact css code to put a background behind a centered div tag?

  1. #1
    Join Date
    Jan 2014
    Location
    pakistan
    Posts
    50
    Rep Power
    70

    What is the exact css code to put a background behind a centered div tag?

    What is the exact css code to put a background behind a centered div tag?

  2. #2
    Join Date
    Feb 2014
    Location
    india
    Posts
    202
    Rep Power
    72
    Code CSS:
    body {

    background:#cccccc;
    }

    #parent {
    background:#cccccc;

    _____________________________

    Website Designers in Mumbai

    Web Designers in Mumbai

  3. #3
    Join Date
    Apr 2019
    Location
    Ahmedabad
    Posts
    18
    Rep Power
    0
    HTML Code:
    <html>
    <head>
    	<style>
    	   div{
    	   margin:0 auto;
    	   background-image:url("image.jpg");(or)
               background-color:cyan;
    	   width:300px;
               height:300px;
    	   }
          </style>
    </head>
    
    <body>
    
    <div>
      Centered DIV
    </div>
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do I add a background image?
    By chuckiekey in forum Website Programming
    Replies: 3
    Last Post: 12-07-2019, 03:49 PM
  2. cheap real estate script exact clone of makaan.com
    By sahil101 in forum Site, Domains and Links Marketplace
    Replies: 0
    Last Post: 12-02-2010, 08:57 PM
  3. GPS - Know Your Exact Position Anywhere In The World
    By goolie in forum News and Announcements
    Replies: 13
    Last Post: 28-10-2009, 04:40 PM
  4. Replies: 4
    Last Post: 16-05-2009, 05:10 PM
  5. how to cut out the background ??
    By akumie in forum Websites Review and Suggestion
    Replies: 9
    Last Post: 22-02-2004, 04:52 PM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112