Articles not center align
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Jan 22, 2009 3:15 pm
Articles not center align
Hi guys, I have sorted this problem before, but cant figure it now...
I cant get the content of articles to center align when being viewed on the website.
I have changed the text align in the css template file.
Please someone that remembers, I have searched for the answer, just cant find it, have the boards deleted old posts ?
Thanks
I cant get the content of articles to center align when being viewed on the website.
I have changed the text align in the css template file.
Please someone that remembers, I have searched for the answer, just cant find it, have the boards deleted old posts ?
Thanks
- drmmr763
- Joomla! Ace
- Posts: 1671
- Joined: Tue Oct 23, 2007 8:51 pm
- Location: Orlando, Florida
- Contact:
Re: Articles not center align
Can you post a link to your site? I'll try to take a look. Also, have you tried just a simple tag?
Code: Select all
<div align="center">text</div>
-Chad Windnagle
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
Re: Articles not center align
I am having a similar issue. I can't center align some of my content either. Also, the footers and other information in some of my extensions align to the left. For example, in Joomla Comment the credit at the bottom aligns left and in Fireboard the users avatar, name, rank etc is all aligned left. What do I do about that?
t3nacity
- drmmr763
- Joomla! Ace
- Posts: 1671
- Joined: Tue Oct 23, 2007 8:51 pm
- Location: Orlando, Florida
- Contact:
Re: Articles not center align
Does the issue vary on each template or is it universal? I'm suspecting it's a templating issue rather than a Joomla! issue. Check the default template and see what your results are. Also you may have to add some code to the CSS divs to get things to work correctly.
Post links to your sites guys, I can't give you any advice unless I can see the issue and check out some code.
Post links to your sites guys, I can't give you any advice unless I can see the issue and check out some code.
-Chad Windnagle
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
Re: Articles not center align
I am using the default template as this is the default template forum. My website is http://www.usfpaintball.com Thanks for the help!
I did some testing and it is something in the default template for sure.
I did some testing and it is something in the default template for sure.
t3nacity
- drmmr763
- Joomla! Ace
- Posts: 1671
- Joined: Tue Oct 23, 2007 8:51 pm
- Location: Orlando, Florida
- Contact:
Re: Articles not center align
Are you using the center tool in the editor to try to center content?I am having a similar issue. I can't center align some of my content either
Yes this is related to the template. There is a line in the template.css file that left justifies everything:Also, the footers and other information in some of my extensions align to the left.
line 182
Code: Select all
#whitebox div {
text-align:left;
I'm not sure if you actually have a problem, or you just want to change the way things were made. It seems to me that the template is functioning correctly, just not the way you prefer.
Fireboard has it's own templating system that isn't really related to Joomla!'s template. If you look at the css file and use FireBug, I think you can change some things by adding:Fireboard the users avatar, name, rank etc is all aligned left. What do I do about that?
Code: Select all
#div_name_here {
text-align: center;
}
-Chad Windnagle
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
Re: Articles not center align
It is a problem actually, not just a preference. In a different template things that are supposed to be centered are.
t3nacity
- drmmr763
- Joomla! Ace
- Posts: 1671
- Joined: Tue Oct 23, 2007 8:51 pm
- Location: Orlando, Florida
- Contact:
Re: Articles not center align
Yeah well templates will handle those things differently of course. Now, if you want to manually change things, you can simply create div classes and manual overrides for certain components. It's a simple enough task to go hack the tmpl files of your components to force different displays.
-Chad Windnagle
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
Re: Articles not center align
What would happen if I changed
To
Code: Select all
#whitebox div {
text-align:left;
Code: Select all
#whitebox div {
text-align:justify;
t3nacity
- drmmr763
- Joomla! Ace
- Posts: 1671
- Joined: Tue Oct 23, 2007 8:51 pm
- Location: Orlando, Florida
- Contact:
Re: Articles not center align
I checked it in FireBug, it didn't seem to have any effect.
-Chad Windnagle
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
Re: Articles not center align
That's just some spam website. Hopefully a mod will see that.Chayan wrote:u can take help frm http://www.vinivcvd.com.
t3nacity
- drmmr763
- Joomla! Ace
- Posts: 1671
- Joined: Tue Oct 23, 2007 8:51 pm
- Location: Orlando, Florida
- Contact:
Re: Articles not center align
Well let's find something you want centered first of all. Say you want to center the credits on Joomla! Comment.
You'd go to (I'm guessing here cause I don't know the structure) <joomlaroot>/components/com_joomlacomment/views/comments/tmpl/
In that directory there should be a file named "default.php". Open it up and run down near the bottom you should see something that looks like a call to to the language file for the comments and probably a phpecho tag. (This is all pure guess btw, I haven't actually looked at the structure myself to see how it's set up).
Basically what you want to do is add a
You can also add something like:
And then in your template.css file add:
So there are some different wants of doing things to change how it looks. Basically the concept is to add div classes / id's to the areas you want more control over and then add CSS styles to them.
You can also do this stuff using the Template Overrides method:
http://docs.joomla.org/How_to_override_ ... omla!_core
which is the recommended method of J! 1.5.X now.
You'd go to (I'm guessing here cause I don't know the structure) <joomlaroot>/components/com_joomlacomment/views/comments/tmpl/
In that directory there should be a file named "default.php". Open it up and run down near the bottom you should see something that looks like a call to to the language file for the comments and probably a phpecho tag. (This is all pure guess btw, I haven't actually looked at the structure myself to see how it's set up).
Basically what you want to do is add a
Code: Select all
<div align="center/left/right/"> phpecho</div>
Code: Select all
<div id="your_id_here">phpecho</div>
Code: Select all
.your_id_here {
text-align: center;
}
You can also do this stuff using the Template Overrides method:
http://docs.joomla.org/How_to_override_ ... omla!_core
which is the recommended method of J! 1.5.X now.
-Chad Windnagle
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Jan 22, 2009 3:15 pm
Re: Articles not center align
ok sorry back to my original question...
Yeah url is HERE
I'm using the basic milkyway template, not added or change much to the standard setup.
I did have this installed awhile back and I fixed this problem then, so i think its a standard template problem, I have tried changing the white_div to center align but I dont want pill boxes to be center, just the articles...
I remember it was a case of adding some code, or changing somrthing, 1 line stuff...
any ideas would be helpful, yes i have tried using center align buttons and adding to html code of articles, still goes to left align
Yeah url is HERE
I'm using the basic milkyway template, not added or change much to the standard setup.
I did have this installed awhile back and I fixed this problem then, so i think its a standard template problem, I have tried changing the white_div to center align but I dont want pill boxes to be center, just the articles...
I remember it was a case of adding some code, or changing somrthing, 1 line stuff...
any ideas would be helpful, yes i have tried using center align buttons and adding to html code of articles, still goes to left align
- t3nacity
- Joomla! Apprentice
- Posts: 32
- Joined: Wed Aug 22, 2007 3:48 am
- Location: Tampa, Florida, US
- Contact:
-
- Joomla! Apprentice
- Posts: 16
- Joined: Thu Feb 05, 2009 3:13 am
Re: Articles not center align
Having same issues. Anybody resolve?
Thanks
Matt
Thanks
Matt
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Feb 10, 2009 6:16 pm
Re: Articles not center align
Similar: I am using the stock milkyway template and have the right side mods turned off, one column article, and this is not on the front page. Only one article on the page and it won't center properly unless I have a text line that is longer than the article width, long enough to require a wrap. With a paragraph of text the content in the article centers properly, without the paragraph the content in the article does not center (i.e. pics and stuff). The Footer is always centered. How do I make the article center without the long text string???
I am pretty sure the problem is in the template because everything centers properly in JA_Purity.
How do I fix the milkyway template?
I am pretty sure the problem is in the template because everything centers properly in JA_Purity.
How do I fix the milkyway template?
-
- Joomla! Apprentice
- Posts: 9
- Joined: Thu Feb 12, 2009 6:05 am
Re: Articles not center align
This is the problem im having but i have a custom layout
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Feb 19, 2009 6:46 pm
Re: Articles not center align
For the rhuk_milkyway template, add the following code:
margin-left:auto;
margin-right:auto;
to the "table.contentpaneopen, table.contentpane" tag in
templates/rhuk_milkyway/css/template.css
this makes sure there's equal margins on either side!
margin-left:auto;
margin-right:auto;
to the "table.contentpaneopen, table.contentpane" tag in
templates/rhuk_milkyway/css/template.css
this makes sure there's equal margins on either side!
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Feb 10, 2009 6:16 pm
Re: Articles not center align
Thank you exquisitezombie...... Works perfect!
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Sep 15, 2008 10:40 pm
Re: Articles not center align
I am experiencing the same problem and noticed something in the code when viewing the html. I aligned a picture in the center and it works in both the editor and the browser. I aligned some text in the center and it works in the editor but not in the browser. vanilla milkyway template
The code for aligning the picture is: [div style="text-align: center"]
The code for aligning the text is: [<div align="center"]
1 - If I view the article's html and manually change the text alignment div to read the same as the picture alignment div, the text does get centered.
2 - If I place text inside the picture alignment div directly under the picture, the text is centered.
The margin-left:auto; margin-right:auto; code above did not work for me.
I'll keep plugging away and see if I can fix it. Hopefully my findings might trigger a light bulb for one of you in the mean time.
Sheff
The code for aligning the picture is: [div style="text-align: center"]
The code for aligning the text is: [<div align="center"]
1 - If I view the article's html and manually change the text alignment div to read the same as the picture alignment div, the text does get centered.
2 - If I place text inside the picture alignment div directly under the picture, the text is centered.
The margin-left:auto; margin-right:auto; code above did not work for me.
I'll keep plugging away and see if I can fix it. Hopefully my findings might trigger a light bulb for one of you in the mean time.
Sheff
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Sep 15, 2008 10:40 pm
Re: Articles not center align
I just found something that worked for me to center text. I had to force it to use [p align="center"] instead of [div align="center"]
I did this by putting my cursor in front of the text I wanted to center and drop down the middle "format" menu in the editor and click paragraph. Then center the paragraph using the center tool.
A bit of a dodgy work around but, to the guy who's only tool is a hammer, the whole world looks like a nail.
For some reason, this command is not working --> [div align="center"]
Fixing that somehow would be the proper thing to do.
Sheff
I did this by putting my cursor in front of the text I wanted to center and drop down the middle "format" menu in the editor and click paragraph. Then center the paragraph using the center tool.
A bit of a dodgy work around but, to the guy who's only tool is a hammer, the whole world looks like a nail.
For some reason, this command is not working --> [div align="center"]
Fixing that somehow would be the proper thing to do.
Sheff
-
- Joomla! Apprentice
- Posts: 6
- Joined: Mon Jul 27, 2009 5:03 am
Re: Articles not center align
sheffsss wrote:I just found something that worked for me to center text. I had to force it to use [p align="center"] instead of [div align="center"]
I did this by putting my cursor in front of the text I wanted to center and drop down the middle "format" menu in the editor and click paragraph. Then center the paragraph using the center tool.
A bit of a dodgy work around but, to the guy who's only tool is a hammer, the whole world looks like a nail.
For some reason, this command is not working --> [div align="center"]
Fixing that somehow would be the proper thing to do.
Sheff
This worked for a charm for me. I just have to type everything and center it in paragraph, then go back and edit the different parts to what I originally wanted.
-
- Joomla! Apprentice
- Posts: 40
- Joined: Fri Jul 17, 2009 6:28 pm
Re: Articles not center align
On a similar subject, can anyone tell me why, if you copy and paste from MS Word into an article, the text will wrap, but if you type directly into the article (in article edit) it does not wrap?
- drmmr763
- Joomla! Ace
- Posts: 1671
- Joined: Tue Oct 23, 2007 8:51 pm
- Location: Orlando, Florida
- Contact:
Re: Articles not center align
The text should always wrap. Also you should basically never paste from MS Word because Word creates a horrible mess of code that will screw up your articles.
If text isn't wrapping, ensure that you don't have any crazy code by viewing the article source. Also make sure you don't have any tables or images that are wider than the text area.
If text isn't wrapping, ensure that you don't have any crazy code by viewing the article source. Also make sure you don't have any tables or images that are wider than the text area.
-Chad Windnagle
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
Please use the search feature as your question might already have been answered.
http://www.s-go.net/ ~ Website Hosting - Strategic Marketing - Website Development - Print Work
-
- Joomla! Apprentice
- Posts: 11
- Joined: Mon Sep 15, 2008 10:40 pm
Re: Articles not center align
I just tested this and it wraps no problem as long as I don't enter more than 185 characters without a space (1024x768 is my current resolution). If I enter more than 185 characters without a space before the 185th character it doesn't wrap. (Open a new test article and hold down one letter key until you hit about 200 characters, then scroll back and insert a space somewhere at around 100. It should wrap right away at that space).
As far as pasting from Word goes, it's probably pasting invisible carriage return characters that you can't see, so drmmr763 is correct when he says you better check the source to see what it translated those to in order to make it wrap. There may be some unwanted clutter in your code.
sheff
As far as pasting from Word goes, it's probably pasting invisible carriage return characters that you can't see, so drmmr763 is correct when he says you better check the source to see what it translated those to in order to make it wrap. There may be some unwanted clutter in your code.
sheff
-
- Joomla! Apprentice
- Posts: 40
- Joined: Fri Jul 17, 2009 6:28 pm
Re: Articles not center align
Thanks for the replies. I find the HTML editor seems to remove bits of code that aren't needed e.g. if I do a test with some nonsense code and hit update, it's gone next time I look at the code in the HTML editor. Will it still be there, causing problems, even though the HTML editor doesn't show it?
Also - using the 'loadmodule' plugin to display a menu within an article does the same thing: with the menu set to display in legacy horizontal mode, the menu items disappear off the right hand side (with no scroll bar). Any ideas?
I'm using the JA_purity template. Could that be the source of the problem perhaps?
All help very much appreciated.
Also - using the 'loadmodule' plugin to display a menu within an article does the same thing: with the menu set to display in legacy horizontal mode, the menu items disappear off the right hand side (with no scroll bar). Any ideas?
I'm using the JA_purity template. Could that be the source of the problem perhaps?
All help very much appreciated.
-
- Joomla! Fledgling
- Posts: 4
- Joined: Tue May 25, 2010 4:35 pm
Re: Articles not center align
I'm using the siteground-j15-14 template -- this solution worked perfectly for me! Thank you!!!
~Erica
~Erica
exquisitezombie wrote:For the rhuk_milkyway template, add the following code:
margin-left:auto;
margin-right:auto;
to the "table.contentpaneopen, table.contentpane" tag in
templates/rhuk_milkyway/css/template.css
this makes sure there's equal margins on either side!
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65
-
- Joomla! Apprentice
- Posts: 5
- Joined: Sat Jan 05, 2008 10:16 pm
Re: Articles not center align
oh man. thank you very much. that works perfectly.exquisitezombie wrote:For the rhuk_milkyway template, add the following code:
margin-left:auto;
margin-right:auto;
to the "table.contentpaneopen, table.contentpane" tag in
templates/rhuk_milkyway/css/template.css
this makes sure there's equal margins on either side!
But i don't know what can i do when im changed my template with other one