vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Programming Discussion :: Aligning text in smack center of a page - View Topic
Topic Rating: *****
Printable View
ashkir
Full Member
***

[Avatar]

Posts: 1,159
Status: Offline
Gender: Male
Location: Cali!
Age: 35
Joined:  
Reputation: 42%  


pmtwitterskypemsnyahoo
Aligning text in smack center of a page (6th Jan 10 at 10:25am UTC)
I want to align my splash image/text in the smack center of the page, but I cannot seem to figure this out.

Anyone know of a way to do this? I mean for both valign and center align (yes I know firefox disobeys many center tags now).
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Aligning text in smack center of a page (6th Jan 10 at 5:43pm UTC)
Surround the text with a tag with the attributes of align and valign may work, you just need to find the right tag that will work for your needs

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Aligning text in smack center of a page (6th Jan 10 at 6:49pm UTC)
Aligning vertically is complex. Google it because as far as I remember it involves some JavaScript etc. The only other option is to just add some margin to the top of the image a nice small number just to push it away from the top of the browser. {Smile}
dog199200
Guest
Re: Aligning text in smack center of a page (6th Jan 10 at 10:04pm UTC)
why not just do <div valign="center" align="center">*splash page images code here*</div>

if you don't assign a class to the div, then it wont have a border of anything.I do it on my sites all the time and I used firefox up until a few days ago.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Aligning text in smack center of a page (6th Jan 10 at 10:42pm UTC)
Posted By dog199200 on 6th Jan 10 at 10:04pm
 
why not just do <div valign="center" align="center">*splash page images code here*</div>

if you don't assign a class to the div, then it wont have a border of anything.I do it on my sites all the time and I used firefox up until a few days ago.

I'm 99.9% sure that it won't center vertically to the whole page. {Unsure}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Aligning text in smack center of a page (6th Jan 10 at 11:55pm UTC)
Unless you set the height and width of the div

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Aligning text in smack center of a page (7th Jan 10 at 2:07am UTC)
Even then it causes problems as far as I remember. I remember it's not as easy as that. =/
ashkir
Full Member
***

[Avatar]

Posts: 1,159
Status: Offline
Gender: Male
Location: Cali!
Age: 35
Joined:  
Reputation: 42%  


pmtwitterskypemsnyahoo
Re: Aligning text in smack center of a page (7th Jan 10 at 4:56am UTC)
Posted By dog199200 on 6th Jan 10 at 10:04pm
 
why not just do <div valign="center" align="center">*splash page images code here*</div>

if you don't assign a class to the div, then it wont have a border of anything.I do it on my sites all the time and I used firefox up until a few days ago.


Firefox ignores valign too :[
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Aligning text in smack center of a page (7th Jan 10 at 6:38am UTC)
FF doesn't ignore valign for me, I have it in a <td> tag on my forum and it works

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Aligning text in smack center of a page (7th Jan 10 at 6:56am UTC)
aiken what you have, isn't what the OP wants.
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Aligning text in smack center of a page (7th Jan 10 at 4:37pm UTC)
I have Windows Vista with the latest version of FF

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
dog199200
Guest
Re: Aligning text in smack center of a page (7th Jan 10 at 8:05pm UTC)
 
Posted By dog199200 on 6th Jan 10 at 10:04pm
 
why not just do <div valign="center" align="center">*splash page images code here*</div>

if you don't assign a class to the div, then it wont have a border of anything.I do it on my sites all the time and I used firefox up until a few days ago.


Firefox ignores valign too :[



Thats funny, cause I do it all the time {Unsure} is anything you can do it via CSS and using the div tags, using a class.
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 9 14
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Re: Aligning text in smack center of a page (10th Jan 10 at 12:18am UTC)
I believe there is a CSS way to do it provided you know its' height. I believe the idea is to put it in a container with some absolute positioning of 50% top and a negative top margin.

If you want, I can try to dig it out from my notes?

Image
ashkir
Full Member
***

[Avatar]

Posts: 1,159
Status: Offline
Gender: Male
Location: Cali!
Age: 35
Joined:  
Reputation: 42%  


pmtwitterskypemsnyahoo
Re: Aligning text in smack center of a page (12th Jan 10 at 7:10am UTC)
 
I believe there is a CSS way to do it provided you know its' height. I believe the idea is to put it in a container with some absolute positioning of 50% top and a negative top margin.

If you want, I can try to dig it out from my notes?


I decided to do something new. Thanks though Ross. ^^.
 Printable View

All times are GMT+0 :: The current time is 5:54am
Page generated in 0.745 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums