Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
How To Align MediaWiki Content Center
Old 11-29-2005, 12:37 PM How To Align MediaWiki Content Center
spiralfive's Avatar
Skilled Talker

Posts: 63
Trades: 0
I've got my custom design almost 100% finished.... except I can't get the content to center inside the background like it's supposed to be. The width is correct (900px), but it's still aligned right. How do you make the content (content wrapper) align center? Here's the CSS where I think it would go (as the whole CSS file is huge):


Code:
#column-content {
    width: 100%;
    float: right;
    margin: 0 0 .6em -12.2em;
    padding: 0;
}
#content {
    margin: 2.8em 0 0 12.2em;
    padding: 0 1em 1.5em 1em;
    background: white;
    color: black;
    border: 1px solid #aaa;
    border-right: none;
    line-height: 1.5em;
    position: relative;
    z-index: 2;
}
#column-one {
    padding-top: 160px;
}
/* the left column width is specified in class .portlet */

/* Font size:
** We take advantage of keyword scaling- browsers won't go below 9px
** More at http://www.w3.org/2003/07/30-font-size
** http://style.cleverchimp.com/font_size_intervals/altintervals.html
*/

body {
    font: x-small sans-serif;
    background-image: url(bggg.gif);
    background-repeat: repeat-y;
    background-position: center;
    color: black;
    margin: 0;
    padding: 0;
}
__________________

Please login or register to view this content. Registration is FREE
spiralfive is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-29-2005, 01:02 PM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
This might be classed as cheating, but put text-align: center.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.

Last edited by Mooofasa; 12-01-2005 at 03:36 PM..
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Old 11-29-2005, 02:06 PM
spiralfive's Avatar
Skilled Talker

Posts: 63
Trades: 0
Already tried that. The text aligns center, but everything else is still aligned right.
__________________

Please login or register to view this content. Registration is FREE
spiralfive is offline
Reply With Quote
View Public Profile
 
Old 11-29-2005, 02:15 PM
spiralfive's Avatar
Skilled Talker

Posts: 63
Trades: 0
Nevermind, I just changed the background to match it. Though, it'd still be nice to fix it like I wanted it. http://www.wikischool.be/
__________________

Please login or register to view this content. Registration is FREE
spiralfive is offline
Reply With Quote
View Public Profile
 
Old 12-01-2005, 03:40 PM
Mooofasa's Avatar
Defies a Status

Posts: 1,611
Name: Michael (mik) Land
Location: England
Trades: 0
in the body select of your CSS ( body {} ) put text-align: center and margin-top: 0em; margin: auto; This way, it will keep the distance from the left and right the same - essentially making it centered. However, all of the other selectors need to be changed to text-align: left or justified, where needed.
__________________

Please login or register to view this content. Registration is FREE
- Tumblog with thoughts, quotes, links, videos, images and my creations.

Please login or register to view this content. Registration is FREE
- The best free web browser.

Please login or register to view this content. Registration is FREE
- Firefox is now Firefail.
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Reply     « Reply to How To Align MediaWiki Content Center
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22971 seconds with 12 queries