-
AuthorPosts
-
September 19, 2011 at 2:36 pm #168722
Hi,
When writing an aritcle, I use the center alignment yet on the frontend, the pictures are aligned to the left. Is there a way to automatically set the picture to center align? Please help me.
The html code is:
<p style=”text-align: center;”>
<img alt=”” class=”caption” src=”images/stories/image.jpg” /></p>See screenshot. Thanks.
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
September 19, 2011 at 2:50 pm #413616Hi,
Could you give me a link to your page as you said?September 19, 2011 at 2:55 pm #413617Ooops, I forgot. It is: http://tinyurl.com/3q3jfyo I had to make the url shorter using tinyurl.
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
September 19, 2011 at 3:11 pm #413622You find this code from /templates/system/css/general.css in the line #173
.caption {
text-align: center!important;
padding-left: 250px; < add this line
}September 19, 2011 at 4:58 pm #413654Thanks khoand. The padding definitely fixed the article in question but what it did was that it threw all other images from other articles away from the screen. So I removed it for now.
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
September 19, 2011 at 5:27 pm #413660You try add this code into /templates/ja_teline_iv/css/template.css
div.img_caption.undefined{
margin:auto;
}1 user says Thank You to khoand for this useful post
September 19, 2011 at 11:22 pm #413737Wow, excellente, fantasticooo. Thanks a lot.
n6rej Friendn6rej
- Join date:
- November 2006
- Posts:
- 1040
- Downloads:
- 0
- Uploads:
- 63
- Thanks:
- 79
- Thanked:
- 145 times in 90 posts
September 19, 2011 at 11:39 pm #413744<em>@khoand 268926 wrote:</em><blockquote>You try add this code into /templates/ja_teline_iv/css/template.css
div.img_caption.undefined{
margin:auto;
}
</blockquote>
khoand where can we see the w3c documentation for the undefined element?khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
September 20, 2011 at 2:59 am #413782@blink_black
You’re welcome.
@n6rej
undefined is not element, it is a class. You can see it when you use firebug to inspect div element has image.jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
September 20, 2011 at 3:04 pm #413909Hi
Troy:
By use FB you can see this
<div class="img_caption undefined" style="width: 200px;"><img border="0" src="/images/stories/vincent-omeje.jpg" class="caption"></div>
As you can see we have div class : img_caption undefinedActually by myself, i think it’s really correct. Maybe by somehow js or php have trouble and return this value string “undefined”
Thank you
Viet Vun6rej Friendn6rej
- Join date:
- November 2006
- Posts:
- 1040
- Downloads:
- 0
- Uploads:
- 63
- Thanks:
- 79
- Thanked:
- 145 times in 90 posts
September 20, 2011 at 3:10 pm #413912I see adbrite causing a js error
<script type="text/javascript"> var AdBrite_Title_Color = '000000';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFCC';
var AdBrite_Border_Color = '000000';
var AdBrite_URL_Color = 'FFFFFF';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1968557&zs=3138305f313530&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</center></script><!-- End: adBrite --></center> </div>
</div>So we actually have TWO class’s applied to the one div. >:(
img_caption & undefined. 😮jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
AuthorPostsViewing 12 posts - 1 through 12 (of 12 total)This topic contains 12 replies, has 4 voices, and was last updated by jooservices 13 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
How to center images in articles
Viewing 12 posts - 1 through 12 (of 12 total)