473,840 Members | 1,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How Do I Center This Sample Webpage In Firefox?

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="MainHe ader" Src="/MainHeader.ascx "
%>
<%@ Register TagPrefix="T" TagName="Banner " Src="/Banner.ascx" %>
<%@ Page language="c#" Codebehind="Def ault.aspx.cs"
AutoEventWireup ="false" Inherits="T.Def ault" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>T Home</title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="C#" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<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="BannerHeade r" 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="BannerFoote r" runat="server"> </T:Banner>
</td>
</tr>
</table>
</div>
</form>
</body>
</HTML>

Nov 19 '05 #1
4 6290
<div align="center">
<div align="center">
place stuff here
</div>
</div>

--
Daniel Fisher(lennybac on)
"Joey" <jo*********@to pscene.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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="MainHe ader" Src="/MainHeader.ascx "
%>
<%@ Register TagPrefix="T" TagName="Banner " Src="/Banner.ascx" %>
<%@ Page language="c#" Codebehind="Def ault.aspx.cs"
AutoEventWireup ="false" Inherits="T.Def ault" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>T Home</title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="C#" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<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="BannerHeade r" 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="BannerFoote r" runat="server"> </T:Banner>
</td>
</tr>
</table>
</div>
</form>
</body>
</HTML>

Nov 19 '05 #2
I have noticed that Mozilla based browsers tend to disregard inline
CSS. So, therefore, try something like
<head><style>.M yClassStyle{col or:#ff0000;}</style></head><body><div
class="MyClassS tyle">This text should be red.</div></body></html>

Hope this helps more.
Daniel Fisher(lennybac on) wrote:
<div align="center">
<div align="center">
place stuff here
</div>
</div>

--
Daniel Fisher(lennybac on)
"Joey" <jo*********@to pscene.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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="MainHe ader" Src="/MainHeader.ascx "
%>
<%@ Register TagPrefix="T" TagName="Banner " Src="/Banner.ascx" %>
<%@ Page language="c#" Codebehind="Def ault.aspx.cs"
AutoEventWireup ="false" Inherits="T.Def ault" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>T Home</title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="C#" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<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="BannerHeade r" 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="BannerFoote r" runat="server"> </T:Banner>
</td>
</tr>
</table>
</div>
</form>
</body>
</HTML>


Nov 19 '05 #3
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(lennybac on) wrote:
<div align="center">
<div align="center">
place stuff here
</div>
</div>

--
Daniel Fisher(lennybac on)
"Joey" <jo*********@to pscene.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
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="MainHe ader" Src="/MainHeader.ascx "
%>
<%@ Register TagPrefix="T" TagName="Banner " Src="/Banner.ascx" %>
<%@ Page language="c#" Codebehind="Def ault.aspx.cs"
AutoEventWireup ="false" Inherits="T.Def ault" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>T Home</title>
<meta content="Micros oft Visual Studio .NET 7.1" name="GENERATOR ">
<meta content="C#" name="CODE_LANG UAGE">
<meta content="JavaSc ript" name="vs_defaul tClientScript">
<meta content="http://schemas.microso ft.com/intellisense/ie5"
name="vs_target Schema">
<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="BannerHeade r" 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="BannerFoote r" runat="server"> </T:Banner>
</td>
</tr>
</table>
</div>
</form>
</body>
</HTML>


Nov 19 '05 #4
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.

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
26887
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
4
16150
by: Philipp Lenssen | last post by:
Is it possible in IE6+NS7 to center-align a div of fixed width which itself contains elements which use "position: absolute"? Using "margin-left: auto" and "margin-right: auto" works well to center something, but the absolute-positioned contents of the outside layer will be stuck to the left of the window...! Thanks a lot! -- Google Blogoscoped http://blog.outer-court.com
2
11416
by: joey.powell | last post by:
Make Firefox Center Content in a div Or td Tag By Using CSS? Does anyone know how to do this. IE works great with text-align:center; but Firefox just always left-aligns...
7
3250
by: Alex | last post by:
Hi Everone, I need some advice on how to setup 4 columns where the outside two are absolute (120px) and the inner two (side by side) are relevent (Fluid) and change with the screen. Here's my rough layout:
2
3298
by: doug s | last post by:
How would I access the source of a webpage? I would like to get the source, then use a regexp to find text on a webpage. For example, retrieving a counter, or some other text that dynamically changes. I'm implementing this for firefox. right now, i have a web page opening that contains that info, but i would rather have a pop up alert() that shows that info. thanks for any help. and any code snippets would be great.
12
4250
by: M.L. | last post by:
When loaded from my hard drive, the webpage I'm working on renders fine on IE6, Firefox 2.0.0.1, and Opera 9.02. However, after uploading it to the web there are 2 images that fail to display on those browsers. All the other images and everything else on the page render just fine. 1.) I converted one of the gif images to a jpeg but that made no difference. 2.) I validated the webpage offline using Tagcheck, and online using the...
6
1459
by: Anton Vredegoor | last post by:
Since a few days I've been experimenting with a construct that enables me to send the sourcecode of the web page I'm reading through a Python script and then into a new tab in Mozilla. The new tab is automatically opened so the process feels very natural, although there's a lot of reading, filtering and writing behind the scene. I want to do three things with this post: A) Explain the process so that people can try it for themselves...
1
3491
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and the sidebar (right) doesn't center here's the css i'm modifying to center it. i apologise for the mess. <html> <head> <title>cris-kun's 'Blog - www.puff-x.com</title> <$BlogMetaData$>
13
3335
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. Firefox and Safari on the other hand don't treat text-align in that way. In my tests on those browsers, they only centers images and text. Any DIVs, object/embeds or tables remain default unaligned and generally appear on the left. Considering...
0
10924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10301
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9444
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7023
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4078
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3139
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.