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. Div Alignment.

Div Alignment.

Scheduled Pinned Locked Moved Web Development
10 Posts 6 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.
  • S Offline
    S Offline
    salmonraju
    wrote on last edited by
    #1

    Hi, I am using a DIV tag . Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div. XPos=48 YPos=69 Width = 160 Height=138 I want my DIv tag to be opened with these values.Can you please suggest how I set these values for Div. Thanks, Salmon.

    T D D G 4 Replies Last reply
    0
    • S salmonraju

      Hi, I am using a DIV tag . Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div. XPos=48 YPos=69 Width = 160 Height=138 I want my DIv tag to be opened with these values.Can you please suggest how I set these values for Div. Thanks, Salmon.

      T Offline
      T Offline
      Tony Richards
      wrote on last edited by
      #2

      I think you want to use CSS: http://www.w3schools.com/css/css_positioning.asp[^] http://www.w3schools.com/css/css_float.asp[^]

      D 1 Reply Last reply
      0
      • S salmonraju

        Hi, I am using a DIV tag . Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div. XPos=48 YPos=69 Width = 160 Height=138 I want my DIv tag to be opened with these values.Can you please suggest how I set these values for Div. Thanks, Salmon.

        D Offline
        D Offline
        Dalek Dave
        wrote on last edited by
        #3

        They are invalid under the DIV tag, but can be set as a Style in CSS. See Here[^]

        ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave

        S 1 Reply Last reply
        0
        • T Tony Richards

          I think you want to use CSS: http://www.w3schools.com/css/css_positioning.asp[^] http://www.w3schools.com/css/css_float.asp[^]

          D Offline
          D Offline
          Dalek Dave
          wrote on last edited by
          #4

          You beat me to it! Used similar links too, damn phone calls.

          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave

          1 Reply Last reply
          0
          • D Dalek Dave

            They are invalid under the DIV tag, but can be set as a Style in CSS. See Here[^]

            ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave

            S Offline
            S Offline
            salmonraju
            wrote on last edited by
            #5

            Hi dave/Tony, Thanks for your reply I am using below in Div tag <div id="divID" style="z-index:1000;width: 160; right:50px; top:60px; display: none;position:absolute;"> It looks ok. My problem is one control is there Behind Div ,sometimes the control Text is overlapping with Div control Basically this Div displays Calender. Can any one please suggest. Thanks, Salmon

            L 1 Reply Last reply
            0
            • S salmonraju

              Hi dave/Tony, Thanks for your reply I am using below in Div tag <div id="divID" style="z-index:1000;width: 160; right:50px; top:60px; display: none;position:absolute;"> It looks ok. My problem is one control is there Behind Div ,sometimes the control Text is overlapping with Div control Basically this Div displays Calender. Can any one please suggest. Thanks, Salmon

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              When you mark a css style with "position:absolute;" it disrupts the flow of the document as other content do not know if its existence, sometimes that is exactly what you need. Also, sometimes it is necessary to clear the css style using "clear: both;"

              S 1 Reply Last reply
              0
              • L Lost User

                When you mark a css style with "position:absolute;" it disrupts the flow of the document as other content do not know if its existence, sometimes that is exactly what you need. Also, sometimes it is necessary to clear the css style using "clear: both;"

                S Offline
                S Offline
                salmonraju
                wrote on last edited by
                #7

                Hi Richard, Can you please provide what code i need to implement to fix this Issue. Please suggest. Thanks,

                L 1 Reply Last reply
                0
                • S salmonraju

                  Hi Richard, Can you please provide what code i need to implement to fix this Issue. Please suggest. Thanks,

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Not knowing how your document flows (the HTML + CSS + JS), I can't offer you any code snippets. I'm not a mind-reader. I don't know what your code needs because I don't have access to the source code. And I certainly don't know what your "brief" is with regards to the look/feel/functionality of the web page/website. The absolute property does not flow with the document. Relative property does. The clear tags is there to use where some incompatibilities between the CSS implementation by the various browsers causes certain display issues. Experiment with relative properties as well as the clear tags. You might also wish to familiarize yourself with the CSS Box Model. The link above (provided by CP Member Tony Richards) to w3schools will have data about that.

                  1 Reply Last reply
                  0
                  • S salmonraju

                    Hi, I am using a DIV tag . Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div. XPos=48 YPos=69 Width = 160 Height=138 I want my DIv tag to be opened with these values.Can you please suggest how I set these values for Div. Thanks, Salmon.

                    D Offline
                    D Offline
                    daveyerwin
                    wrote on last edited by
                    #9

                    salmonraju wrote:

                    Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div

                    <html>
                    <body>
                    <div onmouseover="document.getElementById('myPopDiv').style.visibility='visible'"
                    onmouseout="document.getElementById('myPopDiv').style.visibility='hidden'">hoverMe
                    <div id="myPopDiv"
                    style="visibility:hidden;position:absolute;top:69;left:48;background-color:red;"

                    I have popped</div></div>
                    other content<br>other content<br>other content<br>other content<br>other content<br>
                    </body>
                    </html>

                    1 Reply Last reply
                    0
                    • S salmonraju

                      Hi, I am using a DIV tag . Earlier i was using Popup which has below allignment values. Due to some problems we thought not to use PopUp and using Div. XPos=48 YPos=69 Width = 160 Height=138 I want my DIv tag to be opened with these values.Can you please suggest how I set these values for Div. Thanks, Salmon.

                      G Offline
                      G Offline
                      groower
                      wrote on last edited by
                      #10

                      hmmm... I guess it's have looks like this:

                      #ground {
                      background-color:#111;
                      opacity: 0.65;
                      filter:alpha(opacity=65);
                      position:absolute;
                      z-index: 9001;
                      top:0px;
                      left:0px;
                      width:100%;
                      }
                      #popUpDiv {
                      position:absolute;
                      background-color:#eeeeee;
                      width:300px;
                      height:300px;
                      z-index: 9002

                      You can try learn more on html css tutorial. Seemed I met this info there :)

                      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