MyBB Community Forums

Full Version: center text in a div
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all

this isn't a very mybb related question so i thought i post it here

i need to add something below my forum's logo, text actually, i would like to center it below the logo, <center> centers it relative to the whole page, is there a way to center relative to the div?


sorry if its the wrong forum, i googled a lot but am not that good with CSS
<div align="center">blah</div>
? Smile
(2009-05-04, 11:55 AM)Ryan Loos Wrote: [ -> ]
<div align="center">blah</div>
? Smile

thanks for ur reply Smile

that centers it in the middle of the page, i mean, i want it centered below the logo, which is left aligned Shy

and the text is dynamic so using spaces won't work Smile

what i want is that the center tag centers as if the div is the whole page, if u know what i mean Big Grin
Maybe an image would help.. I think I know what you want but seeing it visually would probably help. Smile

Thanks.
hope that clears it
1. Create a div with the exact width of the logo image
2. Place the logo image within the div
3. Place your <center>text</center> within the div after the logo image
(2009-05-04, 01:58 PM)hamster Wrote: [ -> ]1. Create a div with the exact width of the logo image
2. Place the logo image within the div
3. Place your <center>text</center> within the div after the logo image

thanx a million, that did it Smile
You may have to enable HTML first if its in your post, Just for reference
He said it was below the header image. Smile

Also, the problem is solved.
Sorry Ryan
Pages: 1 2