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
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    160
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Move a table over little?

    Hi, I made a table and want it to be moved over to the right a little bit. I used the cellspacing to move it away from the wall but it makes the rows look bad so I was wondering if there is an easier way to move my table over a little? If so could you plz list the code thanks

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    You can add blank border space space outside a table by using CSS margins: http://www.w3schools.com/css/css_margin.asp

    You can add blank border space inside table cells by using CSS padding: http://www.w3schools.com/css/css_padding.asp


    The margins would be applied to the table itself; the padding would be applied to the table cells. If neither of those are suitable, you can use CSS position: relative; to set the position relative to its normal location. With that specified, if you want to move the table closer to the right, say by 100 pixels, you could use left: 100px; or right: -100px;. Positioning properties would also be applied to the table itself.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    414
    Thanks
    4
    Thanked 5 Times in 4 Posts
    <table style="margin-left:20px;">

    or

    <table style="margin-:0 30px 20px 5px;">

  • #4
    New Coder
    Join Date
    Apr 2006
    Location
    Manchester, UK
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could use.

    Code:
    margin-left: 5px;


  •  

    Posting Permissions

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