Solved

making a table

Posted on 2007-04-07
7
131 Views
Last Modified: 2010-04-09
Hi,

Can someone write a small html compliant example. I just want some arial text and a small table:

Sentence one
Sentence two (red font)

Col1    Col 2   Col3   Col4
-------------------------------
x      |     y     |   z    |     ?
------------------------------
x      |     y     |   z    |     ?
------------------------------

That's all I need.

Thanks
0
Comment
Question by:DJ_AM_Juicebox
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 9

Expert Comment

by:fuzzboxer
ID: 18870170
This is pretty simple to do, but here you go anyways:

<table>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
<th>Col4</th>
</tr>
<tr>
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
<tr>
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
</table>
0
 

Author Comment

by:DJ_AM_Juicebox
ID: 18870181
Yeah sorry I'm in a rush and have little html experience. What's the correct header I need for the page, don't I need something like:

<html>
<body>
    stuff you posted....
</body>
</html>
0
 
LVL 9

Expert Comment

by:fuzzboxer
ID: 18870192
Oh you need the entire page?  Yea, what you posted should get the job done.  It's simple, but a good place to start learning.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:DJ_AM_Juicebox
ID: 18870222
last simple thing - how do I get a 1 pixel wide line between the rows and columns?
0
 
LVL 9

Expert Comment

by:fuzzboxer
ID: 18870606
There are a couple of different options.  One is to use CSS which is a way to centralize all of your formatting changes.  Another is to apply the formatting directly to the elements.  Here is the second way:

<table border="1">
<tr bordercolor="#000000">
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
<th>Col4</th>
</tr>
<tr bordercolor="#000000">
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
<tr bordercolor="#000000">
<td>x</td>
<td>y</td>
<td>z</td>
<td>?</td>
</tr>
</table>
0
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 18871500
TRY THIS........... With cool formatting, which you can use it throughout your site

<html>
<head>
<title></title>
<style type="text/css">
<!--
.tbl {
      background-color: f4f4f4;
      border: 1px solid #4f4f4f;
}
.txt1 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: normal;
      color: #000000;
}
.txt2 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #FF0000;
}
.txt3 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #000000;
}
-->
</style>
</head>

<body>
<p class="txt1">Sentence One</p>
<p class="txt2">Sentence Two(Red Font)</p>
<table width="400" border="0" cellpadding="5" cellspacing="1" class="tbl">
  <tr>
    <td align="center" class="txt3">Col1</td>
    <td align="center" class="txt3">Col2</td>
    <td align="center" class="txt3">Col3</td>
    <td align="center" class="txt3">Col4</td>
  </tr>
  <tr>
    <td align="center" class="txt1">x</td>
    <td align="center" class="txt1">y</td>
    <td align="center" class="txt1">z</td>
    <td align="center" class="txt1">?</td>
  </tr>
  <tr>
    <td align="center" class="txt1">x</td>
    <td align="center" class="txt1">y</td>
    <td align="center" class="txt1">z</td>
    <td align="center" class="txt1">?</td>
  </tr>
</table>
</body>
</html>
0
 
LVL 8

Accepted Solution

by:
jawahar_prasad earned 500 total points
ID: 18871515
Hi.. You asked for lines between rows and columns... here it is..(the new code)
(Just copy paste, and execute the code)       :-)

<html>
<head>
<title></title>
<style type="text/css">
<!--
.tbl {
      background-color: 4f4f4f;
}
.txt1 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: normal;
      color: #000000;
}
.txt2 {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #FF0000;
}
.tblheader {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: bold;
      color: #000000;
      background-color: #FFFFFF;
}
.tbltxt {
      font-family: tahoma, arial, verdana;
      font-size: 11px;
      font-weight: normal;
      color: #000000;
      background-color: #FFFFFF;
}
-->
</style>
</head>

<body>
<p class="txt1">Sentence One</p>
<p class="txt2">Sentence Two(Red Font)</p>
<table width="400" border="0" cellpadding="5" cellspacing="1" class="tbl">
  <tr>
    <td align="center" class="tblheader">Col1</td>
    <td align="center" class="tblheader">Col2</td>
    <td align="center" class="tblheader">Col3</td>
    <td align="center" class="tblheader">Col4</td>
  </tr>
  <tr>
    <td align="center" class="tbltxt">x</td>
    <td align="center" class="tbltxt">y</td>
    <td align="center" class="tbltxt">z</td>
    <td align="center" class="tbltxt">?</td>
  </tr>
  <tr>
    <td align="center" class="tbltxt">x</td>
    <td align="center" class="tbltxt">y</td>
    <td align="center" class="tbltxt">z</td>
    <td align="center" class="tbltxt">?</td>
  </tr>
</table>
</body>
</html>
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

Suggested Solutions

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 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