Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. div alignment

div alignment

Scheduled Pinned Locked Moved ASP.NET
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benams
    wrote on last edited by
    #1

    I have a div with a backgroung image, I set its width to 300px and its height to 200px. When I do that the div is aligned to the left altough I set : <body style="text-align:center"> When I dont set the div's height and width it looks ok..

    A A 2 Replies Last reply
    0
    • B benams

      I have a div with a backgroung image, I set its width to 300px and its height to 200px. When I do that the div is aligned to the left altough I set : <body style="text-align:center"> When I dont set the div's height and width it looks ok..

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      You can do it using two ways : 1. Change Div layout. give padding for position. 2. Create Table. Put Div inside TD. set alignment for TD.

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Visit My Latest Article : Beginner's Guide : Exploring IIS 6.0 With ASP.NET

      1 Reply Last reply
      0
      • B benams

        I have a div with a backgroung image, I set its width to 300px and its height to 200px. When I do that the div is aligned to the left altough I set : <body style="text-align:center"> When I dont set the div's height and width it looks ok..

        A Offline
        A Offline
        archit3000
        wrote on last edited by
        #3

        set its left coordinates also

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups