By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,584 Members | 1,774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,584 IT Pros & Developers. It's quick & easy.

How to Center content / table under Safari (mac) and Konqueror (Linux) without using frames

P: n/a
Hello fellows,

i would like to center a 800px wide 600px high content area
without using frames. I have "come up" with the following
solution so far. It works under IE 6.0, Firefox 1 (under Windows
and Linux) but not under Konqueror (could not test Safari, but
they have the rendering engine in common (see www.kde.org)):

<pre>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN" >
<HTML>
<HEAD>
<title>noFrame</title>
<LINK href="../styles/style.css" type=text/css
rel=stylesheet >
</HEAD>
<body >
<form id=Form1 method=post runat="server">
<table width="100%" height="100%" border="1">
<tr>
<td width="*" height="*">&nbsp;</td>
<td width="800" height="*">&nbsp;</td>
<td width="*">&nbsp;</td>
</tr>
<tr>
<td width="*">&nbsp;</td>
<td width="800">
<table id="contentTable" width="800"
bgColor="#ffffff" border="1">
<tr id="navRow">
<td colspan="2"><uc1:navigation
id=Navigation1 runat="server"></uc1:navigation></td>
</tr>
<tr id="contentRow">
<td valign="bottom"
height="380"><uc1:lcontent id=Lcontent1 runat="server">
</uc1:lcontent></td>
<td valign="bottom">
<uc1:rcontent id=Rcontent1 runat="server">
</uc1:rcontent></td>
</tr>
<tr id="footerRow">
<td colspan="2" id="footerCell">
<img width=1 src="../1px.gif"></td>
</tr>
</table>
</td>
<td width="*">&nbsp;</td>
</tr>
<tr>
<td width="*" height="*">&nbsp;</td>
<td height="*">&nbsp;</td>
<td width="*">&nbsp;</td>
</tr>
</table>
</form>
</body>
</HTML>

</pre>
As mentioned the above already works under IE 6, Firfox 1.0. But
i really need it under Mac OS X Safari.
I am open for any solution that is less deprecated and works
under IE 5.0, 5.5 6.0 and Firefox and Safari.

Here is the css code:

body, div, table, td, select, input,textarea { color: #
221b5e; font-size: 10px; font-family: Arial, Helvetica,
sans-serif }
body {
background-color: #FFFFFF;
margin: 0 0;
padding: 0px;
}

/* body { background: white url(../hintergrund.jpg) no-
repeat fixed } */
/* #contentTable td { vertical-align: top; } */
td {margin: 0; padding: 0}
#topRow { height: 10px;}
#navRow { height: 40px; vertical-align: top; margin: 0;
padding: 0}
#firstNav img { border: none;}

#lcontent{ width: 150px; vertical-align: bottom;}
#rcontent{ width: 450px; /* vertical-align: bottom; */}
#footerRow{}

#footerCell
{ height: 45px;
background-image: url(../img/footer.gif);
background-repeat: no-repeat;
vertical-align: text-top;
}

.nav1px{ border: none; height: 19px; width: 30px;}
.nav200px{ border: none; height: 19px; width: 205px;}
.nav2px{ border: none; height: 19px; width: 10px;}
.navImg{ border: none; height: 19px; width: 46px; }
.topBlank { border: none; height: 1px; width: 1px;}

Thanks i lot.
Regards

----------------------------------------------
Posted with NewsLeecher v2.1 Beta 2
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
du******@hogwatch.com wrote:
Hello fellows,
Hello. (There are some gals here, too...)
i would like to center a 800px wide 600px high content area without
using frames. I have "come up" with the following solution so far.
It works under IE 6.0, Firefox 1 (under Windows and Linux) but not
under Konqueror (could not test Safari, but they have the rendering
engine in common (see www.kde.org)):
Please post this page somewhere, and validate it first. I see numerous
errors in the code, including most obviously, the <pre> and </pre>
wrapped around the whole page.

http://validator.w3.org/
http://jigsaw.w3.org/css-validator/validator-uri.html

* Binary Usenet Leeching Made Easy *


Heh.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.