Loading...
 
Skip to main content

Features / Usability


Continuation of Blog Text centering immediately in 4.2

Sorry for posting as a new post but I can't seem to post in reply anymore.

Below chibagy wrote "In a normal Tiki install, the text is aligned left as would be expected, which suggest an installation or configuration problem at your site. Did you modify any of the files? Can you give more details, such as what theme you are using (not that this should matter)?"

I decided to go through all the CSS as I had done some personal modifications but nothing that I thought was changed for text alignment.

I found the error and I also checked it with the original 4.2 files - unpacking them again from the zipped download.

The error is in the css from the download.

I am using Strasa theme with fixed-width CSS

In the styles/strasa/options/fixed_width.css

There is:

body {
background-color: #2e3035;
text-align: center;
}

Changing that to left has now fixed the problem. (hoping it doesn't make a problem anywhere else)

> The error is in the css from the download.

Sorry to contradict, but there isn't an error in the downloaded CSS that causes page content to be center-aligned. The strasa/options/fixed_width.css's body {text-align: center;} rule is intentional as it's part of the code to center the fixed-width div within the overall page. Please notice the #main {text-align: left} at line 65 in fixed_width.css (below the body rule and therefore overriding it). Div id="main" contains all the Tiki page content. If in your site the text was centered, I suspect this CSS rule might have been changed or overrided somehow. You might want to check if your site still centers in the page (on wide displays) in all the main browsers.

The reason I feel strongly about there not being an error in the download is that the Strasa theme and fixed_width option have been used at many sites including the Tiki project sites and text was consistently aligned left as expected, in blogs as well as elsewhere. Also the fixed_width.css file code has been used by other themes for quite a while. Actually essentially the same CSS is still being used but is now in the main layout.css file.

How Tiki's CSS works isn't always clear at first, because the page layout method may not be a familiar one and because there's quite a bit of CSS due to the number of features, etc.

-- Gary


All I know is I fixed what I said in my fist post and I don't have a problem any more. I went through all my scripts using text pad to check for changes - it has a function where you can compare scripts and I did this using the ones on my site against those out of the 4.2 zip. The only changes I had made were those to align text to left while trying to work out what they hell was centering.

I haven't made many changes to my CSS you can probably count them on one hand.