Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > HTML, XML, Javascript, AJAX
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 02-06-2005, 01:54 PM   #1 (permalink)
Wysocki
Recruit
 
Join Date: Jan 2005
Location: Covina, CA
Posts: 21
Wysocki is on a distinguished road
How to get single line in tables?

Code:
<html> <head> </head> <body bgcolor="#EEFFEE"> <table width="25%" style="border-collapse: collapse; background-color: #CCFFCC;" border="1"> <tbody><tr> <th width="50">a</th> <th width="80">b</th> </tr> <tr> <td width="50">1</td> <td width="80">2</td> </tr> <tr> <td width="50">3</td> <td width="80">4</td> </tr> </tbody> </table> </div> </body></html>
With the above code I'm able to get a table that has single lines in it instead of the double lines when I just have border="1". The problem is that it looks different in Mozilla an IE. In Mozilla, I get nice black border lines, in IE the lines are white. Since the table is green you can still see them but is there any way to have both browsers see a table with single black lines?
__________________
Wysocki is offline   Reply With Quote
Old 02-06-2005, 03:15 PM   #2 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
This seems pretty similar in IE5.5 and Moz Firefox 1.0:
Code:
<html> <head> </head> <body bgcolor="#EEFFEE"> <style> <!-- table, td { border: 1px solid #000; border-collapse: collapse; } //--> </style> <table width="25%" border="0"> <tbody><tr> <th width="50">a</th> <th width="80">b</th> </tr> <tr> <td width="50">1</td> <td width="80">2</td> </tr> <tr> <td width="50">3</td> <td width="80">4</td> </tr> </tbody> </table> </div> </body></html>
__________________
idx is offline   Reply With Quote
Old 02-06-2005, 03:30 PM   #3 (permalink)
Wysocki
Recruit
 
Join Date: Jan 2005
Location: Covina, CA
Posts: 21
Wysocki is on a distinguished road
Thanks for the great solution! But I wanted the table to be a different color than the background. With your code, I went into the cells and added back the pale green color. When I saw the page it was an ugly yellow-green. Any idea why the color in the cells changed? Even with the cells set to #FFFFFF they are a deep yellow.

Code:
<html> <html> <head> </head> <body bgcolor="#EEFFEE"> <style> <!-- table, td { border: 1px solid #000; border-collapse: collapse; } //--> </style> <table width="25%" border="0"> <tbody><tr> <th bgcolor="#CCFFCC width="50">a</th> <th bgcolor="#CCFFCC width="80">b</th> </tr> <tr> <td bgcolor="#CCFFCC width="50">1</td> <td bgcolor="#CCFFCC width="80">2</td> </tr> <tr> <td bgcolor="#CCFFCC width="50">3</td> <td bgcolor="#CCFFCC width="80">4</td> </tr> </tbody> </table> </div> </body></html>
__________________
Wysocki is offline   Reply With Quote
Old 02-06-2005, 04:14 PM   #4 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Yeah, no closing quote after the #ccffcc.. Although you can easily adjust the color from css and not have to specify it on each row.

Code:
<style> <!-- table, td { border: 1px solid #000; border-collapse: collapse; background-color: #ccffcc; } //--> </style>
-r
__________________
idx is offline   Reply With Quote
Old 02-06-2005, 09:46 PM   #5 (permalink)
Wysocki
Recruit
 
Join Date: Jan 2005
Location: Covina, CA
Posts: 21
Wysocki is on a distinguished road
Damn! It must be the sleep deprivation! I'm starting to lose control over the basics while I'm trying to get more advanced. This is a great solution, but where would you suggest is the best place that I can find more tutorial/info about the <style> stuff, I've just been a basic html guy to this point.
__________________
Wysocki is offline   Reply With Quote
Old 02-07-2005, 05:51 PM   #6 (permalink)
idx
Senior Grasshopper
 
idx's Avatar
 
Join Date: Jun 2003
Location: FL
Posts: 317
idx is on a distinguished road
Well the official source is http://w3c.org/Style/CSS/ .. They seem to have some FAQ/articles/tutorials that might help.

I'm, by far, nowhere close to knowledgeable on design, but I ended up going through enough tutorials and ripping other pages apart to make things work.

-r
__________________
idx is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
writting progress to cl on one line sde Linux / BSD / OS X 4 11-08-2004 01:15 PM
Silly Question: Adding a line break in a string JeC PHP 4 03-17-2003 10:06 AM
Single Quote vs. Double Quote Admin PHP 0 02-20-2003 02:55 PM
VI Editor Tips sde Linux 0 02-17-2003 12:40 AM
cgi script Henry PHP 25 12-30-2002 06:54 AM


All times are GMT -8. The time now is 06:53 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle