PC Review


Reply
Thread Tools Rate Thread

How Do I Center This Sample Webpage In Firefox?

 
 
Joey
Guest
Posts: n/a
 
      12th Aug 2005
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>

 
Reply With Quote
 
 
 
 
Daniel Fisher\(lennybacon\)
Guest
Posts: n/a
 
      12th Aug 2005
<div align="center">
<div align="center">
place stuff here
</div>
</div>

--
Daniel Fisher(lennybacon)


"Joey" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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>
>



 
Reply With Quote
 
Arty
Guest
Posts: n/a
 
      12th Aug 2005
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.


Daniel Fisher(lennybacon) wrote:
> <div align="center">
> <div align="center">
> place stuff here
> </div>
> </div>
>
> --
> Daniel Fisher(lennybacon)
>
>
> "Joey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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>
> >


 
Reply With Quote
 
Joey
Guest
Posts: n/a
 
      12th Aug 2005
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.

Daniel Fisher(lennybacon) wrote:
> <div align="center">
> <div align="center">
> place stuff here
> </div>
> </div>
>
> --
> Daniel Fisher(lennybacon)
>
>
> "Joey" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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>
> >


 
Reply With Quote
 
Joey
Guest
Posts: n/a
 
      12th Aug 2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ppt webpage and Firefox =?Utf-8?B?QmV2?= Microsoft Powerpoint 6 13th Jul 2007 04:10 PM
IE7 can not display any webpage, but FireFox works. jyan Windows XP General 0 28th Jun 2007 02:23 PM
Why does my frontpage 2003 webpage open as an image in firefox? =?Utf-8?B?QWxleA==?= Microsoft Frontpage 9 4th Mar 2006 08:43 PM
Firefox & k-meleon hanging on certain webpage Mike Echo Freeware 0 26th Dec 2005 11:39 AM
Webpage isn't displaying properly on Explorer but is on Firefox? =?Utf-8?B?QW5uIE1hcmll?= Microsoft Frontpage 2 18th Dec 2005 03:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:20 AM.