Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Oct 2010
    Posts
    78
    Thanks
    1
    Thanked 0 Times in 0 Posts

    need help with making div tag work

    hi i am trying to reposition an image but i believe i have it written down incorrectly so i need help to reposition the tag "class="individual_bg" in css

    heres what i have tried:

    .individual_bg tr td {
    margin-top: 60px;
    }

    and here is the html coding

    <table width="105%" border="0" class="profiles">
    <tr>
    <td width="152" height="62" class="individual_bg" background="images/profilebg/individual_bg.png"><img class="photo" src="images/profilebg/images/thumbnail/thumb001.png" /><div class="names">###</div></td>
    <td width="677" rowspan="7" class="about_bg" background="images/profilebg/about_bg.png"></td>
    <td width="241" rowspan="7" background="images/profilebg/info_bg.png"></td>
    </tr>
    <tr>
    <td height="62" class="individual_bg" background="images/profilebg/individual_bg.png"><img class="photo" src="images/profilebg/images/thumbnail/thumb002.png" /><div class="names">###</div></td>
    </tr>
    <tr>
    <td height="62" class="individual_bg" background="images/profilebg/individual_bg.png"><img class="photo" src="images/profilebg/images/thumbnail/thumb002.png" /><div class="names">###</div></td>
    </tr>
    <tr>
    <td height="62" class="individual_bg" background="images/profilebg/individual_bg.png"><img class="photo" src="images/profilebg/images/thumbnail/thumb004.png" /><div class="names">###</div></td>
    </tr>
    <tr>
    <td height="62" class="individual_bg" background="images/profilebg/individual_bg.png"><img class="photo" src="images/profilebg/images/thumbnail/thumb005.png" /><div class="names">###</div></td>
    </tr>
    <tr>
    <td height="62" class="individual_bg" background="images/profilebg/individual_bg.png"><img class="photo" src="images/profilebg/images/thumbnail/thumb006.png" /><div class="names">###</div></td>
    </tr>
    <tr>
    <td height="62" class="individual_bg" background="images/profilebg/individual_bg.png"><img class="photo" src="images/profilebg/images/thumbnail/thumb002.png" /><div class="names">###</div></td>
    </tr>
    </table>

  • #2
    Regular Coder
    Join Date
    Oct 2010
    Location
    Florence, MS
    Posts
    486
    Thanks
    10
    Thanked 33 Times in 32 Posts
    From my knowledge you can just have the
    Code:
    .individual_bg {margin-top: 60px;}
    because your assigning the class to the td already by putting it within the td tag. Just go ahead and put the class in the tr tag too.
    Notice: If you post a problem and it gets fixed, please remember to go back and place it as solved. ;)
    I always recommend the HEAD First series of books for learning a new coding language. ^_^

  • #3
    New Coder
    Join Date
    Oct 2010
    Posts
    78
    Thanks
    1
    Thanked 0 Times in 0 Posts
    just tried that but nothing happen

  • #4
    New Coder
    Join Date
    Oct 2010
    Posts
    78
    Thanks
    1
    Thanked 0 Times in 0 Posts
    anyone still able to help out

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    .individual_bg {margin-top: 60px;}, as Chris Hick, suggested should work. Your inline styles don't help much, tables are not needed here either.

    Try something like this -
    Code:
    .individual_bg {
    	margin-top: 60px;
    	background: url(images/profilebg/individual_bg.png);
    }
    
    and here is the html coding
    
    <table width="105%" border="0" class="profiles">
    <tr>
    <td width="152" height="62" class="individual_bg"><img class="photo"
    A link to your site might help since your question is about an image we don't have.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    New Coder
    Join Date
    Oct 2010
    Posts
    78
    Thanks
    1
    Thanked 0 Times in 0 Posts
    yea i tried that as well, and it stated frozen in the same position here is my other css tags associated with the table. the .profiles moves the entire table, but i am looking to move just just left side of the table, but i am going to try something something else right now that should work

    .profiles {
    position: relative;
    margin-left: 30px;
    margin-top: 30px;

    }

    .profiles td {
    background-repeat: no-repeat;
    }

    .individual_bg {
    margin-top: 300px;
    }

    .names, .names a {
    position: fixed;
    margin-left: 14px;
    margin-top: 10px;
    text-align: center;
    font-family: segoe script;
    font-weight: bold;
    color: #e6930f;
    text-decoration: none;
    }
    Last edited by rusty813; 11-20-2010 at 09:56 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
    •