Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

netscape and safari problems 1

Status
Not open for further replies.

lgj777

Programmer
Jul 23, 2004
2
US
hi everyone--i'm using css in a layout that i've structured with tables. i don't know if this will help, but the 'TitleTable' should have text that is centered in the table.

the pertinent part of the page looks like this:

<html>
<head>
<title>The Pennsylvania Project</title>
<SCRIPT SRC="../js/menu.js"></SCRIPT>
<style type="text/css">

body {
background-color: #0000000;
padding: 45px; 0px; 0px, 0px;
font-family: Optima, sans-serif;
font-size: 14px;
color: #ffffff;
}

TD#titleTable {
background:url("../images/stripe.gif");
border-top: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
border-right: 1px solid #ffffff;
border-left: 1px solid #ffffff;
font-family: 24px Optima, sans-serif;
color: #ffffff;


</style>
</head>
<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" bgcolor="#000000">
<table width=80% border="0" cellspacing="5" cellpadding="5" align="center">
<tr>
<td id="namesTable" width="150" align="center" valign="center">
person#1
<br>
&nbsp;person#2
</td>
<td id="titleTable" align="center">
<h1 align="center" valign="center">the project</h1></td>
</tr>
</table>


it looks fine in IE ...

but netscape seems to automatically plunk some cell padding in. is there a way to address this?

also, iin safari (which i am told more and more mac users are using), while it is centered horizontally, it is not centered vertically--basically, safari is allowing me only the 5 or 10 pixels that i've put in the cell padding (top), and then the text appears.

i am becoming aware of the frustrations of trying to write for different browsers, and how i wish they would standardize things. i am not a professional designer but need to put up two web sites. i'm trying to learn css and i would very much appreciate any insights. thank you!
 

>> i would very much appreciate any insights.

Here's one that will save you *lots* of time:

- Get your site working in Safari / Firefox / Moz / etc, and only when that is done, tweak it and hack your code to get it working in IE.

Most non-IE newer browsers support all the new CSS standards with pretty much no problems (not 100%, but a lot better than IE does). Getting a site to work in IE is then just a matter of adding a few CSS hacks, or whatever it takes.

Oh yes - and always specify a valid DOCTYPE, so that IE gets taken out of quirks mode. I think if you search this forum, you'll probably find many, many posts saying the same thing.

Hope this helps,
Dan
 
hi all--in one quick email, billyray preachersson solved a problem that has been dogging me for weeks. i use bb edit to code, but often just start cranking out a page without an editor, an subsequently NEGLECT specifying a doctype. as soon as i included this at the top of my page, EVERYTHING worked out. thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top