Reply
Centering a webpage - Liquid
Old 03-30-2008, 07:04 PM Centering a webpage - Liquid
Novice Talker

Posts: 10
Name: Pritesh Madlani
Hi,

I am building a website and would like to make it liquid. The website address is:

http://www.cse.dmu.ac.uk/~p04283218/mainframe9/

Can anyone point me in the right direction as to how I would do this please.

Thanks.
pritmadlani is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 03-30-2008, 07:55 PM Re: Centering a webpage - Liquid
joder's Avatar
Flipotron

Posts: 6,311
Name: James
Location: In the ocean.
Hope this is what you are looking for
http://matthewjamestaylor.com/blog/p...-left-menu.htm

If not, let me know and I will try to find what you are looking for.
joder is offline
Reply With Quote
View Public Profile
 
Old 03-30-2008, 09:29 PM Re: Centering a webpage - Liquid
Novice Talker

Posts: 10
Name: Pritesh Madlani
Thank you for your reply - I will definitely try that coding tomorrow. If it doesn't work - I will get back to you.

Thanks again - appreciate it.
pritmadlani is offline
Reply With Quote
View Public Profile
 
Old 03-31-2008, 08:24 AM Re: Centering a webpage - Liquid
Experienced Talker

Posts: 30
Name: laredo
To center a website, u should use cellpadding or The margin button in the page properties. it should probably be the solution to the problem.
larry007 is offline
Reply With Quote
View Public Profile
 
Old 03-31-2008, 09:42 AM Re: Centering a webpage - Liquid
LadynRed's Avatar
Super Moderator

Posts: 6,030
Location: Tennessee
Or maybe you should try READING THE STICKIES ??
http://www.webmaster-talk.com/css-fo...r-website.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 03-31-2008, 10:54 AM Re: Centering a webpage - Liquid
yangyang's Avatar
Skilled Talker

Posts: 51
How about this:

HTML:
<div id="wrapper">
</div>
CSS:
body {
text-align:center;
}
#wrapper {
text-align:left;
margin:0 auto;
width:100%;
}
__________________
40000 pages+1900 images = Free Instant Site!
With 4 years front end web development experience, we offer state of the art PSD to XHTML / CSS slicing service, starting at $129.
yangyang is offline
Reply With Quote
View Public Profile Visit yangyang's homepage!
 
Old 03-31-2008, 01:23 PM Re: Centering a webpage - Liquid
wayfarer07's Avatar
Insomniac

Posts: 550
Name: Abel Mohler
Location: Asheville, North Carolina USA
I fell asleep one night after doing coding, and woke up dreaming about centered, flexible, rounded corner wrapper windows, that could hold multiple items. Here is what I came up with: http://wayfarerweb.com/mockups/ebay_ui/ You are free to study my layout, if you wish. I believe there is one less layer of extra markup than is normally required for these type of layouts. I'm sure this is more extensive than what you need, but it is still an interesting study
__________________
Go FREELANCE <=====||=====> Hire Me

Last edited by wayfarer07 : 03-31-2008 at 01:25 PM.
wayfarer07 is online now
Reply With Quote
View Public Profile
 
Old 03-31-2008, 01:35 PM Re: Centering a webpage - Liquid
joder's Avatar
Flipotron

Posts: 6,311
Name: James
Location: In the ocean.
A fluid layout is more than centering.

Lackofheart: No good using deprecated tags and CSS is for layout.
joder is offline
Reply With Quote
View Public Profile
 
Old 03-31-2008, 04:40 PM Re: Centering a webpage - Liquid
Junior Talker

Posts: 1
place everythign insde of a container DIV, specifiy it's width to 100%; or even easier Display: Block;

follow this with placing margin attributes in the body tag something like

Code:
<body><div id="container">website layout and content</div></body>
Code:
body { margin: 20px 15px 10px 15px; }
#container { display: block; width: 100%; }
__________________
A beautiful selection of gift baskets.
JamesStern is offline
Reply With Quote
View Public Profile
 
Old 03-31-2008, 09:11 PM Re: Centering a webpage - Liquid
LadynRed's Avatar
Super Moderator

Posts: 6,030
Location: Tennessee
Quote:
place everythign insde of a container DIV, specifiy it's width to 100%; or even easier Display: Block;
There is no point in setting display:block, a div IS a already a block-level element !

The width 100% isn't really necessary either, since the div will take up ALL the width if you don't specify something less than 100%.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-01-2008, 12:46 AM Re: Centering a webpage - Liquid
wayfarer07's Avatar
Insomniac

Posts: 550
Name: Abel Mohler
Location: Asheville, North Carolina USA
Quote:
There is no point in setting display:block, a div IS a already a block-level element !
lol...
__________________
Go FREELANCE <=====||=====> Hire Me
wayfarer07 is online now
Reply With Quote
View Public Profile
 
Old 04-01-2008, 05:38 AM Re: Centering a webpage - Liquid
vectorialpx's Avatar
Super Talker

Posts: 128
Name: irimia octavian
Location: Romania
in it's initial form, the div is a block element but it can be set as display:inline and display:block is just an assurance that it will be SURE a block. But, why 100%?

to center a div I make something like this :

.main_div {
width:980px; margin:0 auto; background-color:#09f; /* */
}

edit // a fluid layout means you don't need a div... the entire page is yours but... this is not to nice for the design. You can use floats for columns
__________________
my photos, my website, creation lab
vectorial pixel web services :: and, sorry for my English !

Last edited by vectorialpx : 04-01-2008 at 05:41 AM.
vectorialpx is offline
Reply With Quote
View Public Profile Visit vectorialpx's homepage!
 
Old 04-01-2008, 10:48 AM Re: Centering a webpage - Liquid
joder's Avatar
Flipotron

Posts: 6,311
Name: James
Location: In the ocean.
Quote:
Originally Posted by vectorialpx View Post
edit // a fluid layout means you don't need a div... the entire page is yours but... this is not to nice for the design. You can use floats for columns
That is incorrect. A fluid layout is one that doesn't used fixed width. They resize with the browser or window size.
joder is offline
Reply With Quote
View Public Profile
 
Old 04-01-2008, 12:56 PM Re: Centering a webpage - Liquid
wayfarer07's Avatar
Insomniac

Posts: 550
Name: Abel Mohler
Location: Asheville, North Carolina USA
Here is an example of a a liquid (or fluid) layout: http://www.ojos-de-dios.com. Resize your browser's window to see how it reacts. Liquid layouts have a reputation for being somewhat more difficult than fix-width layouts, and suffer from some limitations, mainly IE6's lack of support for the min-width property. However, they are still very useful.

Centering a liquid layout is mostly the same as centering one of fixed-width.

May we move on to the next subject?
__________________
Go FREELANCE <=====||=====> Hire Me
wayfarer07 is online now
Reply With Quote
View Public Profile
 
Old 04-01-2008, 02:17 PM Re: Centering a webpage - Liquid
LadynRed's Avatar
Super Moderator

Posts: 6,030
Location: Tennessee
Quote:
in it's initial form, the div is a block element but it can be set as display:inline and display:block is just an assurance that it will be SURE a block.
If there is nothing in the CSS to set it to an inline element, then setting it to display:block is just extraneous and unnecessary code.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-01-2008, 07:20 PM Re: Centering a webpage - Liquid
vectorialpx's Avatar
Super Talker

Posts: 128
Name: irimia octavian
Location: Romania
Quote:
is just extraneous and unnecessary code.
yes... I must agree but it is nothing incorrect...
__________________
my photos, my website, creation lab
vectorial pixel web services :: and, sorry for my English !
vectorialpx is offline
Reply With Quote
View Public Profile Visit vectorialpx's homepage!
 
Old 04-02-2008, 10:24 AM Re: Centering a webpage - Liquid
LadynRed's Avatar
Super Moderator

Posts: 6,030
Location: Tennessee
I didn't say it was incorrect, I said it was POINTLESS, and also NOT the solution to the OP's problem.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Centering a webpage - Liquid
 

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company |