473,785 Members | 3,285 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 6287
<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
26875
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
16147
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
11411
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
3245
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
3292
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
4235
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
1454
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
3486
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
3323
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
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8968
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...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
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
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4045
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
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
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.