473,698 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Center DIV?

Hi,

I've posted this question a few months ago but didn't get a truly satisfying
answer then. So I'd like to post my question again:

How can I center a DIV? The content in the DIV should be left-aligned, but
the DIV itself should be centered, like:

----------------------------------
| |
| =============== ==== |
| | Foo | |
| | Another foo | |
| | Still a foo-bar | |
| =============== ==== |
| |
| |
----------------------------------

There should be no fixed widths. The width of the DIV should be the width of
the content.

TIA,
Axel Dahmen
Jul 21 '05 #1
32 14665
"Axel Dahmen" <NO*****@NoOneK nows.invalid> wrote:
I've posted this question a few months ago but didn't get a truly satisfying
answer then.
You most certainly did, no less than 33 replies.
So I'd like to post my question again:


What do we look like, a jukebox? Here are (the same) answers again, they
are still valid:
http://groups-beta.google.com/group/...e959b6bf7a4f41

--
Spartanicus
Jul 21 '05 #2
Spartanicus wrote:
"Axel Dahmen" <NO*****@NoOneK nows.invalid> wrote:

I've posted this question a few months ago but didn't get a truly satisfying
answer then.

You most certainly did, no less than 33 replies.

So I'd like to post my question again:

What do we look like, a jukebox? Here are (the same) answers again, they
are still valid:
http://groups-beta.google.com/group/...e959b6bf7a4f41

forgive me for bypassing a very entertaining thread and risking to give
a solution that may have been proposed already.

what works in IE: (doesnt work in gecko based browsers !)
<center>
<div style="width: 0%; text-align: left; border: 2px solid black;">
blabla<br>
blablabla<br>
blabla<br>
</div>
</center>

ps .. i can hardly imagine it would take someone more than a few months
to come with something simple as this, so i already fear that it wont be
completely to your satisfaction.

gl

martin

Jul 21 '05 #3
On Wed, 26 Jan 2005 19:28:33 +0100, Ali Babba <Al******@40Ban dits.com> wrote:
forgive me for bypassing a very entertaining thread and risking to give a
solution that may have been proposed already.

what works in IE: (doesnt work in gecko based browsers !)


In that case, you didn't provide any solution at all.
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #4
Barbara de Zoete wrote:
On Wed, 26 Jan 2005 19:28:33 +0100, Ali Babba <Al******@40Ban dits.com>
wrote:
forgive me for bypassing a very entertaining thread and risking to
give a solution that may have been proposed already.

what works in IE: (doesnt work in gecko based browsers !)

In that case, you didn't provide any solution at all.

in case you mean, 'for gecko based browsers', you are right. since i
have not proposed a solution for gecko based browser your remark is also
completely superfluous.

in case you mean, 'in general', you are completely wrong, as most people
use IE.

in any case, your remark doesnt contribute to answering the OP question.
Jul 21 '05 #5
On Wed, 26 Jan 2005 19:47:40 +0100, Ali Babba <Al******@40Ban dits.com> wrote:
Barbara de Zoete wrote:
On Wed, 26 Jan 2005 19:28:33 +0100, Ali Babba <Al******@40Ban dits.com> wrote:
forgive me for bypassing a very entertaining thread and risking to give a
solution that may have been proposed already.

what works in IE: (doesnt work in gecko based browsers !)

In that case, you didn't provide any solution at all.

in case you mean, 'for gecko based browsers', you are right. since i have not
proposed a solution for gecko based browser your remark is also completely
superfluous.

in case you mean, 'in general', you are completely wrong, as most people use
IE.

in any case, your remark doesnt contribute to answering the OP question.


To start with you last remark: Usenet is not a helpdesk. It's not here to answer
OP's questions. I'm not here to answer OP's questions or any questions.
As soon as someone posts a question in this newsgroup, others will start to
discuss. Maybe just the post, maybe just the question, maybe they divert from
the subject entirely from start on. If any answer comes along, OP is a lucky
man. It's pure chance.

Than the 'as most people use IE' bit: How would you like a RADAR that covers
'about 80%'? If one provides a solution, it should be for the world wide web.
That includes a lot more than damned fucking IE, the basterd crappy peace of
shit. Doesn't mean a solution shouldn't try to work in IE _as well_.

So, stands: a solution that excludes (knowingly) gacko based browsers
_is_not_a_solut ion_for_the_wor ld_wide_web.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #6
Barbara de Zoete wrote:
On Wed, 26 Jan 2005 19:47:40 +0100, Ali Babba <Al******@40Ban dits.com>
wrote:
Barbara de Zoete wrote:
On Wed, 26 Jan 2005 19:28:33 +0100, Ali Babba
<Al******@40Ban dits.com> wrote:

forgive me for bypassing a very entertaining thread and risking to
give a solution that may have been proposed already.

what works in IE: (doesnt work in gecko based browsers !)

In that case, you didn't provide any solution at all.

in case you mean, 'for gecko based browsers', you are right. since i
have not proposed a solution for gecko based browser your remark is
also completely superfluous.

in case you mean, 'in general', you are completely wrong, as most
people use IE.

in any case, your remark doesnt contribute to answering the OP question.

To start with you last remark: Usenet is not a helpdesk. It's not here
to answer OP's questions. I'm not here to answer OP's questions or any
questions.
As soon as someone posts a question in this newsgroup, others will start
to discuss. Maybe just the post, maybe just the question, maybe they
divert from the subject entirely from start on. If any answer comes
along, OP is a lucky man. It's pure chance.

Than the 'as most people use IE' bit: How would you like a RADAR that
covers 'about 80%'? If one provides a solution, it should be for the
world wide web. That includes a lot more than damned fucking IE, the
basterd crappy peace of shit. Doesn't mean a solution shouldn't try to
work in IE _as well_.

So, stands: a solution that excludes (knowingly) gacko based browsers
_is_not_a_solut ion_for_the_wor ld_wide_web.

well then, why dont you give it a shot
or do you prefer to divert (avoid) the OP's question
i guess that when you are strolling along this news group you must have
an interest in css and may be able to supply
a_solution_for_ the_world_wide_ web ?! if not, i really wonder what you
are doing here.
Jul 21 '05 #7

"Ali Babba" <Al******@40Ban dits.com> schreef in bericht
news:ct******** **@news.hispeed .ch...
Barbara de Zoete wrote:
On Wed, 26 Jan 2005 19:47:40 +0100, Ali Babba <Al******@40Ban dits.com>
wrote:
Barbara de Zoete wrote:

On Wed, 26 Jan 2005 19:28:33 +0100, Ali Babba <Al******@40Ban dits.com>
wrote:

> forgive me for bypassing a very entertaining thread and risking to
> give a solution that may have been proposed already.
>
> what works in IE: (doesnt work in gecko based browsers !)

In that case, you didn't provide any solution at all.

in case you mean, 'for gecko based browsers', you are right. since i
have not proposed a solution for gecko based browser your remark is
also completely superfluous.

in case you mean, 'in general', you are completely wrong, as most people
use IE.

in any case, your remark doesnt contribute to answering the OP question.

To start with you last remark: Usenet is not a helpdesk. It's not here to
answer OP's questions. I'm not here to answer OP's questions or any
questions.
As soon as someone posts a question in this newsgroup, others will start
to discuss. Maybe just the post, maybe just the question, maybe they
divert from the subject entirely from start on. If any answer comes
along, OP is a lucky man. It's pure chance.

Than the 'as most people use IE' bit: How would you like a RADAR that
covers 'about 80%'? If one provides a solution, it should be for the
world wide web. That includes a lot more than damned fucking IE, the
basterd crappy peace of shit. Doesn't mean a solution shouldn't try to
work in IE _as well_.

So, stands: a solution that excludes (knowingly) gacko based browsers
_is_not_a_solut ion_for_the_wor ld_wide_web.

well then, why dont you give it a shot
or do you prefer to divert (avoid) the OP's question
i guess that when you are strolling along this news group you must have an
interest in css and may be able to supply
a_solution_for_ the_world_wide_ web ?! if not, i really wonder what you are
doing here.


Oh man, you're waaaaaay out of line.
Jul 21 '05 #8
On Wed, 26 Jan 2005 20:05:54 +0100, Ali Babba <Al******@40Ban dits.com> wrote:
well then, why dont you give it a shot
or do you prefer to divert (avoid) the OP's question
i guess that when you are strolling along this news group you must have an
interest in css and may be able to supply a_solution_for_ the_world_wide_ web ?!
if not, i really wonder what you are doing here.
You don't get it, do you?

Like Spartanicus has said just a few moments/posts ago:

<quote>
"Axel Dahmen" <NO*****@NoOneK nows.invalid> wrote:
I've posted this question a few months ago but didn't get a truly satisfying
answer then.
You most certainly did, no less than 33 replies.
So I'd like to post my question again:


What do we look like, a jukebox? Here are (the same) answers again, they
are still valid:

<http://groups-beta.google.com/group/comp.infosystem s.www.authoring .stylesheets/browse_frm/thread/6be6ea1e0f4c6e7 8/dae959b6bf7a4f4 1?tvc=1&q=Axel+ Dahmen&_done=%2 Fgroup%2Fcomp.i nfosystems.www. authoring.style sheets%2Fsearch %3Fgroup%3Dcomp .infosystems.ww w.authoring.sty lesheets%26q%3D Axel+Dahmen%26q t_g%3D1%26searc hnow%3DSearch+t his+group%26&_d oneTitle=Back+t o+Search&scroll Save=&&d#dae959 b6bf7a4f41>
</quote>

Now, go play with your crayons or start living your age.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #9
Barbara de Zoete wrote:
On Wed, 26 Jan 2005 20:05:54 +0100, Ali Babba <Al******@40Ban dits.com>
wrote:
well then, why dont you give it a shot
or do you prefer to divert (avoid) the OP's question
i guess that when you are strolling along this news group you must
have an interest in css and may be able to supply
a_solution_for_ the_world_wide_ web ?! if not, i really wonder what you
are doing here.

You don't get it, do you?

<quote>

- i can read, you should have noticed - </quote>


quote you:
* To start with you last remark: Usenet is not a helpdesk.

# the purpose of usenet is not defined by you, fortunatly.
if people like make use of usenet as an helpdesk, so be it, not up to
you to decide how people make use of usenet.

quote you again:
* a solution that excludes (knowingly) gacko based browsers
_is_not_a_solut ion_for_the_wor ld_wide_web.

# heheh, you make me laugh - now you also define what is good or bad for
the world_wide_web ?! you really have troubles to find solid ground
below your feet.

i bet you dont have a solution to OP's question that satisfies your own
criteria. in stead, you have lots of energy left over to crap on IE and
al those that use it.

last quote, just for fun:
* ... That includes a lot more than damned fucking IE, the basterd
crappy peace of shit .

# :) aren't we getting a bit carried away by out personal preferences.
Jul 21 '05 #10

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

Similar topics

7
3240
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
7910
by: Claude Shea | last post by:
Is DB2 Development Center an addon product that I have to download or purchase separately? I can't seem to find it in any of my downloads or on any of my CDs. Is it available for all versions of DB2? I currently have two versions of DB2. My production environment is DB2 UDB WSUE V8.1 on a Redhat Linux 7.2 . Currently in the process of creating a new production environment which is DB2 UDB Workgroups V8.2 which is installed on Suse 9...
1
1809
by: Henry Reardon | last post by:
I have been having problems with the Development Center for several days now. It seemed to be working fine when I initially installed DB2 (LUW) Version 8 (FP7) and upgraded to FP8, except that I kept getting SQL1131 whenever I tried to prepared a stored procedure. As a result, I completely deleted DB2 and reinstalled version 8 and upgraded to FP8. At that point, I experimented a bit with some of the Environment Settings, particularly the...
4
6278
by: Joey | last post by:
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...
1
3482
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$>
24
3613
by: GloStix | last post by:
I'm trying to center this banner, it's in a div that has the same width so it's not exactly "centering" but it's screwed up, It works in safari but in Firefox it's messed up. I uploaded a Video to show what I'm talking about. http://screencast.com/t/i5SLg3cAczH (*WARNING, TAKES A WHILE TO LOAD*) *HTML* <html> <head> <title>James Mann - Portfolio</title>
2
16361
by: yangtono | last post by:
Hi, I am creating a table to list some data. The table is using a sorting and highlight function that I found from the net. I can't attach image here, basically html will wrap the heading, therefore I notice the second line of the header is left align instead of centering. I believe it's because of the sort.htc script that will output an arrow when user click on the header to sort. The code is as below: <TABLE width="100%">
14
2424
by: gaijinco | last post by:
I was a hobbist web coder for years but I had to sidestep for a while. Now I'm trying to return to it and I'm trying to clarify how am I supposed to do somethings with CSS v.s. HTML and I'm specially having difficulties with center alignment of elements like images and tables. How is the "right" way to do it? (books that I have checked seemed to dodge the issue) I also have a doubt. html-atributes width and height are preferred over...
13
3302
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...
10
2604
by: dougancil | last post by:
I have a web page that I converted from a psd file to html with Photoshop and imported into Dreamweaver. The problem I'm having is that some viewers comment on the fact that the page is left justified. I inserted a div tag into the html with a wrap around selection and tried to modify the css rules so that this would align properly, and the page is still aligning left justified. Here is the code that I have for my css: #site_layout {...
0
8680
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...
1
8899
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
8871
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
7738
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
6528
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
4371
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...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.