How Do I Center This Sample Webpage In Firefox?

J

Joey

Does anyone know how to center this sample webpage in Firefox? If so,
will you provide the example as it applies to this sample webpage? I
have read numerous posts and articles on how to center content with
CSS...none are working for me. The best I can do at this point is the
"text-align: center" for my div tag, but that only works in IE. I want
to be able to center all the content within the div (effectively center
the site content) for both IE and Firefox...

---
<%@ Register TagPrefix="T" TagName="MainHeader" Src="/MainHeader.ascx"
%>
<%@ Register TagPrefix="T" TagName="Banner" Src="/Banner.ascx" %>
<%@ Page language="c#" Codebehind="Default.aspx.cs"
AutoEventWireup="false" Inherits="T.Default" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>T Home</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="/Base.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<div style="MARGIN-LEFT:auto; WIDTH:100%; MARGIN-RIGHT:auto">
<table class="Main">
<tr>
<td align="center">
<T:Banner id="BannerHeader" runat="server"></T:Banner>
</td>
</tr>
<tr>
<td align="center">
<T:MainHeader id="MainHeader" runat="server"></T:MainHeader>
</td>
</tr>
<tr>
<td align="left">
<asp:literal id="litMain" runat="server" Text=" "></asp:literal>
</td>
</tr>
<tr>
<td align="center">
<T:Banner id="BannerFooter" runat="server"></T:Banner>
</td>
</tr>
</table>
</div>
</form>
</body>
</HTML>
 
D

Daniel Fisher\(lennybacon\)

<div align="center">
<div align="center">
place stuff here
</div>
</div>
 
A

Arty

I have noticed that Mozilla based browsers tend to disregard inline
CSS. So, therefore, try something like
<head><style>.MyClassStyle{color:#ff0000;}</style></head><body><div
class="MyClassStyle">This text should be red.</div></body></html>

Hope this helps more.
 
J

Joey

Daniel, while that solution works, it does not work in a CSS
stylesheet. What syntax is needed for that? I am sorry I was not more
clear in my original answer.

Specifically, I am looking for some CSS code that will center my site
content in Firefox.
 
J

Joey

Arty,

I have no problems in implementing CSS with or without classes as
inline, imbedded, or linked. In fact, I am making extensive use of it
in my websites!

The problem is specifically: I have not been able to code any CSS class
that will center my site content in Firefox. I have read article after
article about #global, margin: auto, etc. Each "solution" seems
different, and none of them work for me. That is why I posted sample
code in my original post.

It is my opinion that this is WAY TOO COMPLICATED. For goodness sakes,
all I want to do is center some content! I could do that in HTML 1.0
with the old "depricated" 'center' tag!

Anyways, thanks for trying to help me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top