Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Closed Thread
Vertically aligning text in a div in our favorite browser?
Old 05-14-2008, 10:51 PM Vertically aligning text in a div in our favorite browser?
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
Alright I looked at the links at the top, but they confused me. I have it working in Opera, Safari, and Firefox betas, I'm running IE8 Beta on my one computer and IE7 on the other. IE8 hasn't fixed this 'unexpected feature' yet. Before I show what I currently have, I'm working on this for someone else who is using tables, I'm attempting to switch over to CSS for them, but just got to the point where I can start that, first I had to remove a lot of stuff such as the closing align tags (nope not even an opening align tag). So this is what I currently have:
HTML Code:
<tr><td><div style="height:32px;width:176px;background-image:url(images/button.png);min-height:32px;display:table-cell;vertical-align:middle;text-align:center;"><span style="font-size:0.85em;"><a href="index.html" class="left">Home</a></span></div></td></tr>
The CSS I have is:
Code:
body {background-color:#FFFFFF;color:#000000;}
a:link {background-color:#FFFFFF;color:#8B0000;}
a:visited {background-color:#FFFFFF;color:#808080;}
a.left:link {background-color:#808080;font-family:Brush Script MT;}
a.left:visited {background-color:#808080;font-family:Brush Script MT;color:#8B0000;}
a.left:hover {background-color:#808080;font-family:Brush Script MT;color:#FFFF70;}
If you want to cry the site I'm working on is http://www.earthquakeresurrection.com/ but don't say I didn't warn you.
Anyway if anyone can help explain how to with what I have center the text vertically that'd help.
http://70.15.139.117:8181/quake/ should be the link to it on my machine.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>

Last edited by Arenlor; 05-14-2008 at 11:04 PM.. Reason: Added the site to view it.
Arenlor is offline
View Public Profile Visit Arenlor's homepage!
 
 
Register now for full access!
Old 05-15-2008, 04:16 AM Re: Vertically aligning text in a div in our favorite browser?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.candsdesign.co.uk/referen...ertical-align/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 05-15-2008, 09:51 PM Re: Vertically aligning text in a div in our favorite browser?
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
Ermm it's working in 3/4 of the browsers I tried, but in the fourth, IE, it doesn't work. I'm trying to figure out what I can do to get it to work in IE.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
View Public Profile Visit Arenlor's homepage!
 
Old 05-20-2008, 06:27 PM Re: Vertically aligning text in a div in our favorite browser?
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
Anyone have any help?
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
View Public Profile Visit Arenlor's homepage!
 
Old 05-20-2008, 07:01 PM Re: Vertically aligning text in a div in our favorite browser?
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Couldn't you take a different approach and align it with line-height ??

Just a thought
__________________

Please login or register to view this content. Registration is FREE
Gilligan is offline
View Public Profile
 
Old 05-20-2008, 08:13 PM Re: Vertically aligning text in a div in our favorite browser?
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
Hmm, how would that work?
EDIT: Nevermind figured it out. Thanks for the tip.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>

Last edited by Arenlor; 05-21-2008 at 01:42 AM.. Reason: See above
Arenlor is offline
View Public Profile Visit Arenlor's homepage!
 
Closed Thread     « Reply to Vertically aligning text in a div in our favorite browser?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30136 seconds with 12 queries