SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Jun 8, 2005, 06:16 #1
- Join Date
- Jun 2005
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
aligning text horizontally in a div
Hi there.
As the title, how do you do it?
i would like the text to be central from top to bottom.
I dont mean from left to right by using left and right autos.
Thanks.John.
-
Jun 8, 2005, 06:27 #2
- Join Date
- Jan 2004
- Location
- Melbourne, Australia
- Posts
- 7,305
- Mentioned
- 1 Post(s)
- Tagged
- 1 Thread(s)
If it's one line of text, you could give the container div:
Code:#name { height: 50px; line-height: 50px; }
-
Jun 8, 2005, 09:41 #3
- Join Date
- Jun 2005
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
many thanks
-
Jun 8, 2005, 14:28 #4
- Join Date
- Mar 2005
- Location
- USA
- Posts
- 5,482
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Horizontally = left/right
Vertically = top/bottom
This was asked just a few days ago: Vertically centre text within a div That thread explains how to vertically align more than just one line of text.We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.
Bookmarks