0

My website http://www.matejkadesign.com is having trouble displaying consistently styled outer table borders across Chrome, IE, and Firefox. The styling I want is in Chrome, but is different both in the other two browsers. I've looked for fixes but find none. I don't style my tables in CSS, I do it in html like this:

<table align="center" cellspacing="5" cellpadding="5" border="4" bordercolor="#3c2610" width="310px" > 

This appears to produce three different effects. How can I make the styling the same across Firefox and IE as in Chrome?

3
  • 1
    Please explain what is not showing properly? Commented Mar 9, 2013 at 23:04
  • Use CSS to specify the exact appearence. When you use the old attributes like that you are left at the mercy of the browser default styling in terms of the border type and what not. Commented Mar 9, 2013 at 23:08
  • thanks. I switched to css styling and my problem was fixed Commented Mar 9, 2013 at 23:31

2 Answers 2

3

Is there any particular reason why you need to use inline styling?

You can fix those behaviors by defining exact border style for both table as well as td tags, by doing this you prevent browser from applying its own styling.

Try this:

table { border: 4px solid #3C2610; } td { border: 1px solid #3C2610; } 
Sign up to request clarification or add additional context in comments.

1 Comment

This fixed up my problem perfectly.
2

You have an HTML <!--Comment--> before your doctype which will trigger IE to go into quirks mode (equivalent to IE5). IE basically parses your document as if it had no doctype. Nothing should precede <!DOCTYPE html>

Secondly you're using deprecated table attributes from HTML 4.01 yet you have technically declared an HTML 5 doctype .. these two reasons most likely explain the discrepancy amongst browsers.

You're also using the deprecated align attribute several times throughout your site .. if you insist on using HTML 4.01 attributes at least change your doctype to match it:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

1 Comment

Originally, I declared HTML5 because I use some HTML5 features. I thought I'd better declare it for safety. Maybe that is not necessary while I'm using deprecated elements?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.