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 4 of 4

Thread: DIV inside TD

  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Posts
    231
    Thanks
    9
    Thanked 1 Time in 1 Post

    DIV inside TD

    I can't get a DIV to align in the center of a TD. I thought I had it but in browser it doesn't show. I took a look at it in Dreamweaver to see if it had any problems, and it shows up in the center there. Any ideas?

    Simple div inside a td..

    Code:
    <table>
    	<tr>
    		<td align=center>
    			<div></div>
    		</td>
    	</tr>
    </table>

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    What's inside the div? How wide is the div? How wide is the table cell?

    And why are you still using tables for layout?

  • #3
    Regular Coder
    Join Date
    Apr 2006
    Posts
    231
    Thanks
    9
    Thanked 1 Time in 1 Post
    Because when I learned web designing, nobody used Divs. I am too lazy to use divs. For now, I have to hurry and get my website done because my bank is about to kick me out for wasting their Space on the computers.

    Once it is up and running, I will begin designing a new layout and take my time with the design.

    Divs are more complicated. I still don't get why I should use them over tables, when I work with tables very, very easily.

    Anyway, on my original question, I fixed it... ...soft of. wrap the divs in another div and align=center on the wrapper. Poor man's way of doing things.

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Well, that's why I asked you the other questions too. To help show you how to center a div.


  •  

    Posting Permissions

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