How do I align a table. See pic

I want to place a table with just a column to place image and text inside, However Whenever i place table or box or raw image , my centered table shifts towards right.
There is many space inbetween, but it just shifts.
here is the 2nd pic.

Plz help me to resolve this.
M using dreamweaver cc


here is what i want to make…

also if i use p tag and try to insert image there. The centered table goes a step down…

Without seeing the actual code you are using, we can only guess, but the most likely reason is that the middle table has padding or margins on the left. If you don’t have a link to a live page, the best thing to do is to post your page code (HTML and CSS) here, so we can see what’s happening.

When you post code on the forums, you need to format it so it will display correctly.

You can highlight your code, then use the </> button in the editor window, or you can place three backticks ``` (top left key on US/UK keyboards) on a line above your code, and three on a line below your code. I find this approach easier, but unfortunately some European and other keyboards don’t have that character.

When you refer to “tables”, do you mean that these are items created using HTML <table> tags? If so, that’s not an appropriate way to code this design. (Table tags should be used only for tabular data.)

I cannot paste the code, as it only shows the bottom part of page. My page is fplnepal.com
However I did manage to align the table and middle table, but they are not aligned in same line. see the page for refrences.

Here is the screenshot of that particular two table…

Your code is very outdated; you are using methods and attributes which are long obsolete.

Aside from that, your code is also invalid. Most of your content has been inserted after the closing </head> tag, and before the opening <body> tag. You need to fix that first. Then you have

<table id="titletable" align="center" width="" border="1">
  <tbody>
   <td colspan="3" align="center" id="latest">Latest</font><tr>
  </tr>
   </td>
   
    
      <td align="center"><img src="Images/GettyImages-696270700.jpg" alt="" width="" height="150" title="Goalkeeper Jordan Pickford joined Everton from Sunderland in a club-record deal Fu"/></td>
      <td align="center"><img src="Images/Bernardo_Silva_(2).jpg" alt="" width="" height="150" title="Portuguese playmaker Bernardo Silva makes switch from French side Monaco. "/></td>
      <td align="center"><img src="Images/zabelta.JPG" alt="" width="" height="150" title="Pablo Zabaleta will wear the No 5 shirt for West Ham after joining on a free transfer from Man City"/></td>
     
    </tr>
  </tbody>
</table>

You need to remove the closing </font> tag (there is no matching opening tag) and correct the positioning of the <tr></tr> tags.

<table id="titletable" align="center" width="" border="1">
    <tbody>
	<tr>
	    <td colspan="3" align="center" id="latest">Latest</td>
	</tr>
    	<tr>
	     <td align="center"><img src="Images/GettyImages-696270700.jpg" alt="" width="" height="150" title="Goalkeeper Jordan Pickford joined Everton from Sunderland in a club-record deal Fu"/></td>
	     <td align="center"><img src="Images/Bernardo_Silva_(2).jpg" alt="" width="" height="150" title="Portuguese playmaker Bernardo Silva makes switch from French side Monaco. "/></td>
	     <td align="center"><img src="Images/zabelta.JPG" alt="" width="" height="150" title="Pablo Zabaleta will wear the No 5 shirt for West Ham after joining on a free transfer from Man City"/></td>
     	</tr>
  </tbody>
</table>

You really shouldn’t be using tables to lay out your pages, and things like “align” and “border” should be controlled by your CSS, not inserted in your HTML.

Do you know how to use the HTML validator? https://validator.w3.org/nu/ You should check your pages there regularly while you’re working on them, to pick up any errors in the code.

2 Likes

Oh that was really helpful. I Dont want to make any complicated lwebsites. Just 3 coloum basic layout website.With middle column being a main for posting main post and sides sides for picture and adsense. Yes its too tough with this table format. But I dont know the other way. I even dowloaded some templates but its hard to edit it. and mainly I want to make my own. Can you provide me some link where can i just build a 3 column layout website?

and another question. Is dreamweaver cc too tough ?? Coz i see ppl using cs5 in youtube tutoriols

May I ask how you are using Dreamweaver? Are you using it as an editor to write your own HTML and CSS, or are you using it in “Design View”, so that Dreamweaver is creating your code?

A basic three-column page is not difficult to achieve, and we can walk you through it, but we need to know whether or not you understand the basic codes.

I just know the simple rules, like css and html tag only… No knowledge on div or advance than that. I created a site … fplnepal.com through it, but it looks so plain and dull… Not visually attracted. + I had to update every page individually .
Here What I did.
Created a index. html as homepage… Included every thing related to the site… Copied the index site about 10 times and edited to make sub pages like about, contact and other pages…
Anyother way or any other easy software to create website… + I want to create a site and will be updating daily like posting main contents. Currently, I should go back to dreamweaver, add p tag over old post and upload the index file to server again and again, its just messed up… I know how to use blogger. but I dont have full control over blogger. + I need 3 column templates with header and footer. With footer having 3-4 menus button including sub domains…

It sounds as if what you really need is Wordpress, or another CMS (content management system) geared to blogging. I don’t use Wordpress, but there is a huge number of themes available, to help you get the look that you want.

We could help you code a simple page layout, but if you don’t understand the code, then next time you try to update you could find yourself back in the same situation.

However, I notice your page has now changed completely since you posted the question, and has a three-column layout. Does that mean you have found an acceptable solution?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.