PHP Alignment Help - SOLVED

Need help with the site/forum/pets? Ask questions and get help from other members here.

PHP Alignment Help - SOLVED

Postby 76heart » Thu Jul 06, 2017 1:02 pm

Hello!
A friend and I have made a site together using phpbb which is currently hosted by propbpbb until we can get a better host, and we've run into a problem. We have both used CS and AS for years and have gotten quite familiar with having center/left/right, but once we have inputted (excuse any poor wording, I'm a noob with coding terms outside the BBCode buttons we have) those options into the site instead of the words inside the alignments showing up on the same line as they do here, they show up one line below like this. If it's any help, here is this as well. Float text (<div style="float:right;">{TEXT}</div>)works just fine for left and right, but there is no center so that does not work. My apologies if this has been answered and asked before! I looked but I couldn't find anything. Anyway, thank you for reading and any help is appreciated!
Last edited by 76heart on Mon Jul 10, 2017 4:36 pm, edited 1 time in total.
User avatar
76heart
 
Posts: 15870
Joined: Wed Nov 28, 2012 12:04 pm
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: PHP Alignment Help

Postby *JACKAL* » Fri Jul 07, 2017 3:33 am

You need to lay the first link out like this

LEFT
RIGHT
CENTER


Code: Select all
[left]LEFT[/left][right]RIGHT[/right][center]CENTER[/center]

__________________________________________

The many types of brackets might be confusing the second link, so the code won't register. Try it without {} and see what happens. I don't quite know what you are trying to do in the second link, but each type of code uses different brackets.

BBCode = [
CSS = {
HTML = <
So basically you are trying to put BB and CSS together in the top box
or CSS and HTML in the lower one.

I'm not a coding guru, but I know you may run into problems mixing your code.












Image
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌
█ ▌













▌█
▌█
▌█
▌█
▌█
▌█
▌█
▌█

Image











Image
Image..Image..Image..Image..Image..Image..Image..Image
User avatar
*JACKAL*
 
Posts: 7573
Joined: Thu Jun 16, 2011 5:37 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: PHP Alignment Help

Postby 76heart » Fri Jul 07, 2017 4:41 am

ahh thank you for responding!

considering it's always one line below no matter the order I didn't think the order was important as an example, but thank you! I tried that in case it would be different and it just looked even more messed up.

I tried what you suggested, and the coding simply showed up as (the spaces are to show it didn't work) [center ]CENTER[ /center], so I'm guessing it has something to do with the site's hosting instead of the coding, considering Advanced Scribes had the same problem until the site move?
The second link is a screenshot of part of the administration control panel, which can be better seen here and here if that's any help too. I also got the codes from places on the phpbb site if that could also be of help.
User avatar
76heart
 
Posts: 15870
Joined: Wed Nov 28, 2012 12:04 pm
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: PHP Alignment Help

Postby Rolly-chan » Mon Jul 10, 2017 9:15 am

Text-alignment will only align the text within the box accordingly. Each new div element creates a new line-break (much like <p>). To prevent that, you need to use "float: left;" or "float: right;". This will make stuff around the div element "float" around it to the left or right. That's also why you always have to put the centered text last, because there is no "float: center" and thus, centered text cannot be floated. But it can float the boxes on the right and left. Hope that helps ^^

EDIT: to clarify - if you put "float: right;" it means that your box will be positioned to the right (same for left).
User avatar
Rolly-chan
 
Posts: 2790
Joined: Tue Nov 18, 2008 8:09 am
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Re: PHP Alignment Help

Postby 76heart » Mon Jul 10, 2017 4:36 pm

@rolly-chan thank you! that is the second thing I tried but it didn't work when paired with center so I guess I put it in wrong or something! thank you loads, you have saved many years of coded forms.
User avatar
76heart
 
Posts: 15870
Joined: Wed Nov 28, 2012 12:04 pm
My pets
My items
My wishlist
My gallery
My scenes
My dressups
Trade with me

Who is online

Users browsing this forum: louveardente and 27 guests