vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Auto center image (https://vborg.vbsupport.ru/showthread.php?t=322242)

Ladillaxx 03-29-2016 02:24 PM

Auto center image
 
Hi.

I want pictures of my posts will automatically center

Its possible?

Thanks :)

MarkFL 03-29-2016 03:09 PM

Try adding the following selector to your "additional.css" template:

HTML Code:

.postcontent img {
        display: block;
        margin-left: auto;
        margin-right: auto;
}


Ladillaxx 03-29-2016 05:00 PM

Quote:

Originally Posted by MarkFL (Post 2568192)
Try adding the following selector to your "additional.css" template:

HTML Code:

.postcontent img {
        display: block;
        margin-left: auto;
        margin-right: auto;
}


Fantastic :):)

Thank you very much

--------------- Added [DATE]1459343112[/DATE] at [TIME]1459343112[/TIME] ---------------

There is a problem, emoticons also come centered.

any solution?

Thanks

--------------- Added [DATE]1459343169[/DATE] at [TIME]1459343169[/TIME] ---------------

Quote:

Originally Posted by MarkFL (Post 2568192)
Try adding the following selector to your "additional.css" template:

HTML Code:

.postcontent img {
        display: block;
        margin-left: auto;
        margin-right: auto;
}


There is a problem, emoticons also come centered.

any solution?

Thanks

Ladillaxx 03-31-2016 04:03 PM

any solution?

Thanks

MarkFL 03-31-2016 04:11 PM

Quote:

Originally Posted by Ladillaxx (Post 2568283)
any solution?

Thanks

Sorry, when posts get merged, they don't show up in the "New Posts" search...anyway, change the selector to:

HTML Code:

.postcontent img:not(.inlineimg) {
        display: block;
        margin-left: auto;
        margin-right: auto;
}


Ladillaxx 03-31-2016 05:41 PM

Its fine :)

Thank you very much

--------------- Added [DATE]1459453961[/DATE] at [TIME]1459453961[/TIME] ---------------

Sorry @MarkFL

to center videos also? :)

Thanks

MarkFL 03-31-2016 09:53 PM

Quote:

Originally Posted by Ladillaxx (Post 2568297)
Its fine :)

Thank you very much

--------------- Added [DATE]1459453961[/DATE] at [TIME]1459453961[/TIME] ---------------

Sorry @MarkFL

to center videos also? :)

Thanks

Try this to also center videos:

HTML Code:

.postcontent img:not(.inlineimg), .postcontent .restrain {
        display: block;
        margin-left: auto;
        margin-right: auto;
}


Ladillaxx 04-01-2016 08:19 AM

Thank you very much

You are the best :)


All times are GMT. The time now is 07:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02836 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete