Solved

making a table

Posted on 2007-04-07
7
120 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now