Centering Content

B

Bern

I used the following to make the content become centered (horizontally and
vertically)


<body style="height: 100%; margin: 0; padding: 0;">

<table cellpadding="0" cellspacing="0" border="0" width="100%"
style="height:100%">
<tr>
<td width="100%" height="100%" align="center" valign="middle">

contents....


</td>
</tr>
</table>
</body>

However, this methods fails once the document is declared to be XHTML
transistional 1.0

so is there another way to make content become centered vertically?
 
B

brucie

In alt.html Bern said:
I used the following to make the content become centered (horizontally and
vertically)
<table cellpadding="0" cellspacing="0" border="0" width="100%"
http://allmyfaqs.com/faq.pl?Tableless_layouts

the document is declared to be XHTML transistional 1.0

pointless. html is yummier
so is there another way to make content become centered vertically?

centering thingys
http://dorward.me.uk/www/centre/
http://www.w3.org/Style/Examples/007/center.html
http://www.student.oulu.fi/~laurirai/www/css/middle/
http://hicksdesign.co.uk/articles/css/vertical_centering_with_css/
 
L

Lois

In alt.html Bern said:
: > the document is declared to be XHTML transistional 1.0

Brucie responded:
: pointless. html is yummier

Why?

I don't know enough to have an opinion about which is better. I'm just
interested in your opinion. (Yes, I know what you're going to do with that.)
Or anyone's opinion.

Thanks,
Lois
 
L

Lois

Brucie wrote:
: >: pointless. html is yummier

Lois asked:
: > Why?
:
: 'cause i said.
:
: i don't see the point of authoring html thats pretending to be
xhtml
: thats pretending to be html. much simpler to just author html
pretending
: to be sgml.

Well, there's a reason. You're saying (I think) that there are no
benefits to XHTML over HTML.

I'm working on a site (the one you helped me with the header in AWW)
that someone else started but I continued. It's in XHTML. Would it
make any difference if I changed it to HTML? Is there any reason to
change it? It's just 6 pages so far, but we'll be adding more pages
later.

It probably wouldn't make any difference, but I thought I'd ask.
Other people's opinions are welcome too.

Thanks,
Lois
 
B

brucie

In alt.html Lois said:
I'm working on a site (the one you helped me with the header in AWW)
that someone else started but I continued. It's in XHTML. Would it
make any difference if I changed it to HTML?

you're already writing html anyway. you're just pretending its xhtml and
when you send it to the browser you have to pretend its html again.
theres no point to it.

if you were writing xhtml its just a cut down version of html rewritten
as an application of xml and xml is just a cut down version of sgml
which is what html is an application of (supposed to be anyway).

and then with xhtml you have the hassle of checking the accept header to
only send xhtml to browsers that support it and html to the others.
Is there any reason to change it?

is there some reason why the markup needs to be html pretending to be
xhtml?
 
M

Mark Parnell

is there some reason why the markup needs to be html pretending to be
xhtml?

I think Lois' point is that she inherited the site from someone else,
and it is already using XHTML. She wants to know whether there is really
any point in converting it back to HTML.

I would say no.
 
B

brucie

In alt.html Mark Parnell said:
She wants to know whether there is really any point in converting it
back to HTML.

it already is html. why continue pretending its not.
I would say no.

it doesn't really matter, women need hobbies to keep them busy when us
men are at work. as long as she has dinner on the table on time there no
problem.

<runs away and hides/>
 
L

Lois

Brucie asked:
: >> is there some reason why the markup needs to be html pretending
to be
: >> xhtml?

Mark Parnell responded:
: > She wants to know whether there is really any point in converting
it
: > back to HTML.

Yeah, that's what I meant. At this stage, changes are easy, but the
site is going to grow to a dozen or 2 pages at some point.

I just changed the doctype to HTML strict for the home page, and it
displays the same. The only other difference I see in the code is the
/> instead of just > for closing brackets. Is that all there is?


: it doesn't really matter, women need hobbies to keep them busy when
us
: men are at work. as long as she has dinner on the table on time
there no
: problem.
:
: <runs away and hides/>

Good thing you ran. I need someone to put dinner on the table because
I'm too busy to cook. Hobbies? It's been a couple of years since I
had time for them.

When are you at work, BTW? You're either the most prolific poster
here and in AWW or you're off on a walkabout.

Lois
 
B

brucie

In alt.html Lois said:
Mark Parnell responded:
:> She wants to know whether there is really any point in converting
:> it back to HTML.
Yeah, that's what I meant. At this stage, changes are easy, but the
site is going to grow to a dozen or 2 pages at some point.

is there some reason why those dozen or 2 pages need to pretend they're
xhtml?
I just changed the doctype to HTML strict

YAY! someone else i've convinced not to believe the hype.
for the home page, and it displays the same.

html displays like html. what were you expecting?
The only other difference I see in the code is the
/> instead of just > for closing brackets. Is that all there is?

depends on the markup, just run it through the validator with the new
dtd.
Good thing you ran.

i didn't really i just sort of jiggled my fat around a bit and decided
it was to much effort to get up.
I need someone to put dinner on the table because I'm too busy to cook.

great, i love cooking.
Hobbies? It's been a couple of years since I had time for them.

good to see your husband giving you jobs to keep you busy around the
house while hes at work. have you finished the side fence yet?
When are you at work, BTW?

24/7 unless i run out of drugs then its 16/7
 
B

brucie

In alt.html Lois said:
It wants a border around the logo (currently border="0"),
border:0;

I guess I'll just have to go back to XHTML. Or HTML loose.

You're welcome to send me food as long as you don't deliver it.

no one loves me
I think I'll just let you bumble along with foot in mouth.

my natural state of being
 
L

Lois

Lois wrote:
: > I just changed the doctype to HTML strict

"brucie" reacted:
: YAY! someone else i've convinced not to believe the hype.

Hype? You never told me about that. I wanna see the hype.

: > for the home page, and it displays the same.
:
: html displays like html. what were you expecting?

Seeing as you're somewhat involved, maybe gooey green.

: > The only other difference I see in the code is the
: > /> instead of just > for closing brackets. Is that all there is?
:
: depends on the markup, just run it through the validator with the
new
: dtd.

It wants a border around the logo (currently border="0"), but that
won't do because the logo is white surrounded by the blue header
except white on the left side where it meets the white body
background. I guess I'll just have to go back to XHTML. Or HTML
loose.

: > I need someone to put dinner on the table because I'm too busy to
cook.
:
: great, i love cooking.

You're welcome to send me food as long as you don't deliver it.

: good to see your husband giving you jobs to keep you busy around
the
: house while hes at work. have you finished the side fence yet?

I think I'll just let you bumble along with foot in mouth.

Lois
 
L

Lois

Lois said:
: > It wants a border around the logo (currently border="0"),

Brucie wrote:
: border:0;

What a cool idea. Specify the border (or lack of border) via CSS
instead of in the img tag. Thanks.

: > I guess I'll just have to go back to XHTML. Or HTML loose.
:
: <bangs head on desk/>

I was hoping you'd do that. I like watching your eyes roll.

: > You're welcome to send me food as long as you don't deliver it.
:
: no one loves me

Actually, we're just afraid of you. I didn't say that I'd eat the
food, but the dog will eat anything and it doesn't make him sick.

Lois
 
L

Lois

Lois wrote:
: Hype? You never told me about that. I wanna see the hype.

Does anyone else want to tell me about the hype around XHTML? Think
of what will happen to Brucie's head if we talk about it. But really,
I want to know what it's about.

Lois
 
N

NOXwebmasterx

Lois said:
Lois wrote:
: Hype? You never told me about that. I wanna see the hype.

Does anyone else want to tell me about the hype around XHTML? Think
of what will happen to Brucie's head if we talk about it. But really,
I want to know what it's about.

Well, you should at least do some reading from the mouths of the horses to
decide whether you believe it's hype or not; look for XHTML info on these
sites:
http://www.webstandards.org
http://w3.org
....It could take an hour or two, but will be well worth it.
 
N

Neal

At this stage, changes are easy, but the
site is going to grow to a dozen or 2 pages at some point.

I might interject here. Might? I will. Now's the time to change it over to
HTML, in my opinion. While it's still small.

I went through three periods of web design:

1) The Idiot Period - I made frames sites, I used blink. 'Nuff said.

2) The I Think I Get It But I Really Don't Period - I am using XHTML for
misguided reasons, but am developing an understanding of semantic markup
and am using CSS for everything appropriate.

3) The Now I Really Have It I Think Period - I am changing everything over
to HTML 4.01 Strict, am learning about newer server-side ways to save
work, and am drinking quite heavily due to the work savings I've enjoyed.

I'm a happy man, You, you could be a happy woman.

Oh, I love the Sox. Love 'em.
 
B

Big Bill

In alt.html Mark Parnell said:



it already is html. why continue pretending its not.


it doesn't really matter, women need hobbies to keep them busy when us
men are at work. as long as she has dinner on the table on time there no
problem.

<runs away and hides/>

Us men? MEN???!!!

BB (on secondement from the SE group)
www.kruse.co.uk
The home of SEO that's shiny!
 
A

Andy Dingley

you're already writing html anyway. you're just pretending its xhtml and
when you send it to the browser you have to pretend its html again.

No, you're writing XHTML and then _when_you_send_it_ you may choose to
pretend that it's HTML. Although there are a whole pile of
(overstated) compatibility problems with getting XHTML out to a
browser , there's no problem with a truly XML authoring process within
your own server farm and content authoring setup.

This has all been chewed over before - Lois, try some searching for
"Appendix C"


My vote - XHTML. Because it has some concrete benefits to me as a
content author, and because the "HTML incompatibility" out with the
browsers just isn't a major problem.

Transitional rather than Strict or 1.1 though. They don't have any
benefits to offer.
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top