1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Floating Div

Discussion in 'CSS' started by sherone, Jan 20, 2011.

  1. #1
    How can I create a div on my table?
    I want to drag it into left side and want to insert some text into this div.
     
    sherone, Jan 20, 2011 IP
  2. ryanqm

    ryanqm Peon

    Messages:
    94
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    can you be more specific? do you want to create a div inside the table or around the table? both are possible and to move the div you may either user position: relative; or position: absolute; can you show the page where you want to put this div
     
    ryanqm, Jan 21, 2011 IP
  3. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #3
    A div ON your table or IN your table?

    An URL would help a lot.
     
    CSM, Jan 21, 2011 IP
  4. xwdfly

    xwdfly Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    need javascript...
     
    xwdfly, Jan 21, 2011 IP
  5. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it sounds like you want to position your text using style elements inside of a table element. Just use style elements as normal.
     
    srisen2, Feb 6, 2011 IP
  6. manishsankari

    manishsankari Peon

    Messages:
    12
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    in your table or out ?
     
    manishsankari, Feb 6, 2011 IP
  7. secretja

    secretja Peon

    Messages:
    217
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Can you show us what you exactly need.
     
    secretja, Feb 7, 2011 IP
  8. CheetahHost

    CheetahHost Greenhorn

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    13
    #8
    #contentbox {
    margin-left: auto;
    margin-right: auto;
    float: left;
    display: block;
    width: 250px;
    height: 250px;
    background-image: url(images/contentbox.png);
    }
     
    CheetahHost, Feb 16, 2011 IP
  9. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    divs work within table elements just as they would outside if the position is relative then your div should stay within the table
     
    srisen2, Feb 21, 2011 IP
  10. News Updates

    News Updates Member

    Messages:
    490
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #10
    try this thread too :p

    http://forums.digitalpoint.com/showthread.php?t=2100079

    or used the code below.

    change positions according to your need, remove top if you want to use "bottom" and +, - margin-left to change position :p

     
    News Updates, Feb 22, 2011 IP