Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Newspaper type sites and "center"

Newspaper type sites and "center"
Thread Tools
skalie
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Mar 1, 2004, 03:50 PM
 
Here's three examples........

http://www.bbc.co.uk/
http://www.nzherald.co.nz/
http://www.independent.co.uk/

.....is there some sort of ethical thing or something that stops them putting in "center" "/center" tags to, er, center, the content when running on a 1024 or greater resolution?
     
philzilla
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Mar 1, 2004, 04:33 PM
 
..or something like "margin: 0 auto;" in their style sheet

(just bringing this nit-picking thread up to date )
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
NYCFarmboy
Mac Elite
Join Date: Jan 2003
Status: Offline
Reply With Quote
Mar 1, 2004, 07:48 PM
 
yes...prety lame.

I imagine someone at those sites will get a large moniter someday and discover..OOOPS!
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Mar 2, 2004, 01:47 AM
 
Originally posted by philzilla:
..or something like "margin: 0 auto;" in their style sheet

(just bringing this nit-picking thread up to date )
Has the "center" tag been depreciated? I've been throwing it into the (included) header and footer just for good measure.

And, er, no, I not trying to nit-pick, I need to develop a similar sort of site, and thought that the likes of the BBC might know something I don't.
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 26, 2005, 07:36 AM
 
Originally Posted by philzilla
..or something like "margin: 0 auto;" in their style sheet

(just bringing this nit-picking thread up to date )
Which doesn't appear to work in IE, btw.
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Jul 26, 2005, 08:00 AM
 
Originally Posted by skalie
Which doesn't appear to work in IE, btw.
Phil's quoted the W3 way, which of course NEVER works in IE (not to infer that's just because Phil said it, BTW!)

If you had

< body >
< div id = "container" >
.... your stuff ...
< /div >
< /body >

then I'd use a stylesheet along the lines of:-

body { margin: 0 auto; text-align: center; }
#container { width: 770px; text-align: left; }
Computer thez nohhh...
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 26, 2005, 08:09 AM
 
Yep, had just added that hack, then found (making a two column layout, similar to yahoo!) that the second column was measuring itself off from the bottom of the left column in IE, so I'm using the hack from the sticky.... (for right column)

[php]
margin: 10 2em 0 460px;!important;
margin: -266 2em 0 460px;
[/php]

Which is fine till the left column changes height.

*sobs*
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 26, 2005, 08:52 AM
 
Just a matter of personal taste (or corporate taste, or whatever). It's not like this sacrifices readability or anything.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 26, 2005, 09:23 AM
 
dude, it works fine in IE6. Be sure your container has a declared width.

!important goes before the semi-colon.

it sounds like you're starting with a hack, and then hacking more on top of it, and that's gonna come back to bite you.

Here's a sample of two columns of text within a centered container. Works identically in IE6, Safari2, and FF1.
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 26, 2005, 09:41 AM
 
Originally Posted by registered_user
Here's a sample of two columns of text within a centered container. Works identically in IE6, Safari2, and FF1.
Open that up in Windows IE6, I'll screenshot it for you if you like, but it doesn't, well, fit on the screen. (left container renders under the right container)
     
Simon Mundy
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Jul 26, 2005, 10:04 AM
 
Originally Posted by registered_user
dude, it works fine in IE6. Be sure your container has a declared width.

!important goes before the semi-colon.

it sounds like you're starting with a hack, and then hacking more on top of it, and that's gonna come back to bite you.

Here's a sample of two columns of text within a centered container. Works identically in IE6, Safari2, and FF1.
It does work if IE6 is set to strict rendering mode (e.g. correct XHTML Strict Doctype). Try adding an XML declaration to a document and watch what happens to the standards. Now THATs irony!
Computer thez nohhh...
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 26, 2005, 10:23 AM
 
Just switched the font from Arial to Verdana and the positioning went all over the shop again in IE6 for windows.

If someone doesn't remind me what the advantages are of using css for postioning are, and quickly, I'm going back to a table based layout. (OK a hybrid, css for "style", tables for layout, and php variables for any tweaking that needs doing).

*walks away from the screen*
( Last edited by skalie; Jul 26, 2005 at 10:32 AM. )
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jul 26, 2005, 10:32 AM
 
my bad, I had uploaded the wrong version. :o

now it works
( Last edited by registered_user; Jul 26, 2005 at 10:50 AM. )
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 26, 2005, 11:00 AM
 
Originally Posted by Simon Mundy
It does work if IE6 is set to strict rendering mode (e.g. correct XHTML Strict Doctype).
That was a good call btw., I'd been working all day with a Transition Doc type, which kind of means I wasted a heck of a lot of time.
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Jul 26, 2005, 11:40 AM
 
And thanks registered_user, if you hadn't taken the time to post that link, Simon wouldn't have mentioned the !doctype, and I'd probably still be running around in circles.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 04:38 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,