Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change # of columns and with in a table

Posted on 2014-09-06
4
Medium Priority
?
112 Views
Last Modified: 2014-09-07
Is there a way to have a table that has 10 columns and the last row only has 4?
I'm trying to center the 4 buttons at the end of the table.
For eample:
|-------------------------------------------------------------------------------------------------------------|
|col1         |col2       |col3     |col4     |col5    |col6    |col7    |col8    |col9    |col10   |
|                                                                                                                                         | 
|               |button1|                |button2|             |button3|             |button4|           |
|-------------------------------------------------------------------------------------------------------------|

Open in new window


It would be easy if all the columns were the same size, but they are not.
0
Comment
Question by:breeze351
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40307841
Use in each cell of the last row
colspan=""

Though 4 will not go into 10 so you would end with something like 2,2,3,3
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 40307859
Use CSS to style div elements.  Tables made sense in 1996 before we had good browser support for CSS.
http://www.w3schools.com/css/
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 2000 total points
ID: 40307954
Ray may or may not be right.  If the table is presenting tabular data then a table is the correct structure.  However if you anre managing layout with a table then you are just creating maintenance problems for yourself. If it is a form, then rather than using styled divs you should use styled fieldsets for layout management to be semantically correct.

In any case, there is no reason to have the buttons as the final row of the table.  Put them in a container element outside the table and then you can position them any way you want using CSS.

Cd&
0
 

Author Closing Comment

by:breeze351
ID: 40308801
I awoke in the middle of the night.  "GOT IT!!!"  Just set a different <DIV> in the CSS.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question