help center a DIV container

Support for PhpBB3. Post here to get help with any phpBB3 related issue here
There is no support here! Only Read Access!
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
Else your topic may be ignored or locked!
Locked
User avatar
neuropass
BBCoder IV
BBCoder IV
Posts: 173
Joined: 11 Apr 2010, 02:33

help center a DIV container

Post by neuropass »

Hey guys i'mn trying to center my Div container for my quick reply block. i know center is deprecated so i'm trying to figure out how to do it. the code i'm using is the following, but it's not perfectly centered... what am i doing wrong?


And this is my html:

Code: Select all

<div id="quickreply">

quick reply code here


</div>

This is my Css:

Code: Select all

/* quick reply position
-------------------------------------------------*/

#quickreply {
  width: 1300px ;
  margin-left: 50% ;
  margin-right: 50% ;
}
Modd it up! TweakScene ;-) Support us! || Follow us ||

Image
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 863
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

Re: help center a DIV container

Post by Steve »

2 options better in the html id say,because of the show hide function, but hey!
one straight into the html:

Code: Select all

<div style="text-align: center;">quick reply code here</div>
You will need to use in variuos places through out the QR html.

html,css option.

html code:

Code: Select all

<div class="qr_center">quick reply code here</div>
followed by css:

Code: Select all

.qr_center {
    text-align: center;
}
you dont need to use an id just class, if you want the centered full code for the quick reply i will post it.
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
Locked