LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-08-2008, 02:04 PM   #1
_john_i_
Member
 
Registered: Aug 2003
Location: Austin, TX
Distribution: Linux from Scratch
Posts: 52

Rep: Reputation: 15
html/css question


Hi guys,

I don't do much html stuff, but I have a hopefully simple question.

I have a simple table, with a defined border style:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Border Test</title> 

</head>

<body>
<table width="100%" style="{border: 1px solid #000000}" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0">
  <td>cell1</td>
  <td>cell2</td>
</table>
</body>
</html>
On internet explorer, it draws the black border around the table.
But in firefox, it does not draw the border.

I found that if I comment out the "<!DOCTYPE" entry at the top, firefox does draw the border.

Can anyone explain why this is? Is there something I am missing that needs to be added once the XHTML doctype is included?

Thanks,

John
 
Old 09-08-2008, 02:53 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Why do you use { and } in style content ?
try: style="border: 1px solid #000000"
and page should look good in firefox

No <tr> </tr> in <table> ?
 
Old 09-08-2008, 03:04 PM   #3
_john_i_
Member
 
Registered: Aug 2003
Location: Austin, TX
Distribution: Linux from Scratch
Posts: 52

Original Poster
Rep: Reputation: 15
Thanks, that did the trick. The "{ }" was already in the existing html I was working on. Not sure why the previous person did that.

The missing <tr> was just my sloppy quick example.

Thanks again,

John
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS/HTML/PHP/OBJECT Question br00tal Programming 3 04-10-2008 10:37 PM
HTML/CSS/JS: Problem with <p> not having an absolute position with CSS. RHLinuxGUY Programming 7 03-03-2007 12:21 AM
A little HTML/CSS help? jon_k General 9 07-17-2005 01:49 AM
html/css retrodict Programming 5 11-01-2004 06:56 PM
html/css hylke Programming 0 06-27-2004 02:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration