HighDots Forums  

Re: How to center a division in another one?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: How to center a division in another one? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: How to center a division in another one? - 12-02-2004 , 08:41 AM






Kerberos wrote:

Quote:
I want to center a division but I can't!
#body {
width: 100%;
}
#main {
background-color: #0099FF;
width: 780px;
margin-left: auto;
margin-right: auto;
}

780px fixed width, eh? Tut-tut.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #2  
Old   
Kerberos
 
Posts: n/a

Default Re: How to center a division in another one? - 12-02-2004 , 08:50 AM






Em Thu, 02 Dec 2004 14:41:28 +0000, Mark Tranchant
<mark (AT) tranchant (DOT) plus.com> escreveu:

Quote:
Kerberos wrote:

I want to center a division but I can't!

#body {
width: 100%;
}
#main {
background-color: #0099FF;
width: 780px;
margin-left: auto;
margin-right: auto;
}

Thanks! It fixed it


Quote:
780px fixed width, eh? Tut-tut.

What do you mean? I chose it because the page has to be readable on an
800px screen, and the content can't scale.

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.osresources.com
http://exodus.jabberstudio.org


Reply With Quote
  #3  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: How to center a division in another one? - 12-02-2004 , 09:28 AM



Kerberos wrote:
Quote:
Em Thu, 02 Dec 2004 14:41:28 +0000, Mark Tranchant
mark (AT) tranchant (DOT) plus.com> escreveu:

780px fixed width, eh? Tut-tut.

What do you mean? I chose it because the page has to be readable on an
800px screen, and the content can't scale.
Content can't scale, eh? Tut-tut.

So you're deliberately excluding WebTV, handhelds and anyone running
less than 800px wide screens; and you're also forcing 800'ers to maximize.

Is there a reason the content can't scale (like large images) or is that
a design decision of yours?

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #4  
Old   
Kerberos
 
Posts: n/a

Default Re: How to center a division in another one? - 12-02-2004 , 10:09 AM



Em Thu, 02 Dec 2004 15:28:55 +0000, Mark Tranchant
<mark (AT) tranchant (DOT) plus.com> escreveu:

Quote:
Kerberos wrote:
Em Thu, 02 Dec 2004 14:41:28 +0000, Mark Tranchant
mark (AT) tranchant (DOT) plus.com> escreveu:

780px fixed width, eh? Tut-tut.

What do you mean? I chose it because the page has to be readable on an
800px screen, and the content can't scale.

Content can't scale, eh? Tut-tut.

So you're deliberately excluding WebTV, handhelds and anyone running
less than 800px wide screens; and you're also forcing 800'ers to
maximize.

Is there a reason the content can't scale (like large images) or is that
a design decision of yours?

I know, but my boss wants a fixed content. I showed him several web sites
with 100% width, but he said he wants white margins when the screen is
larger than 800px :s He said having white pargins is a trend that we have
to follow because it add clarity, but I don't agree.

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.osresources.com
http://exodus.jabberstudio.org


Reply With Quote
  #5  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: How to center a division in another one? - 12-02-2004 , 10:23 AM



Kerberos wrote:

Quote:
I know, but my boss wants a fixed content. I showed him several web
sites with 100% width, but he said he wants white margins when the
screen is larger than 800px :s He said having white pargins is a trend
that we have to follow because it add clarity, but I don't agree.
Show him his page on a 1920px wide 24" widescreen monitor:

Quote:
| content | |

Side margins are fine, but there's no reason why the main content needs
to be pixel-sized. Size the margins in % and use max-width (not IE,
unfortunately) to constrain line length.

Good luck in getting that 24" monitor on expenses.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #6  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: How to center a division in another one? - 12-03-2004 , 09:05 AM



in comp.infosystems.www.authoring.stylesheets, Kerberos wrote:

Quote:
I know, but my boss wants a fixed content.
Really?

Quote:
I showed him several web sites with 100% width,
Not necessarily good idea. Better would have been to ask what page he
uses most, and then if that was fixed width, tell how it would be better
it it wasn't fixed width.

Quote:
but he said he wants white margins when the screen is
larger than 800px :s
Well, that does not require fixed design. That is limiting width. Much
better than fixed pixel width, but still not very sencible.

And why he has this stupid idea of 800px? Why don't you make it em based
so that it will be about 800px on IE default font size?

Quote:
He said having white pargins is a trend that we have
to follow because it add clarity, but I don't agree.
It actually is sometimes good idea to foolow trends. But if it was trend
to tell


--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.