Jul 25, 2008

Css Problem... - Wasn't sure where to put this...

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > CSS (Cascading Style Sheets)

free web hosting

Css Problem... - Wasn't sure where to put this...

Omenessence
For the past few days I have been trying to vertically center a table. Vertically centering things within a table is simple, I already know that. But I want to vertically center the table itself (ie. div, table) and still have it as a liquid design. I do not used fixed positions and don't want to.

If anyone has any suggestions or knows how to do this without using fixed positions, I would be really appreciative with any help.


Thanks all,
J.

Reply

Becca
Are you sure that has something to do with the Cascading Style Script ?? It sounds of "HTMLy"

Reply

biscuitrat
do <center> </center around it. That should suffice. And yes, I don't think it's a problem with the CSS since the only way you can make a table is through HTML. Fight fire with fire, I guess.

Reply

Danieluchis
hmmm maybe u can use align:center; or maybe if it's on html (which i believe so) <p align=center></p> o.o? should that help?

Reply

jalenack
if you're talking about Vertical alignment, you're going to want to use valign or vertical-align. One is html and sorta deprecated, the other is good solid css.

Examples

<td valign="center">

OR

<td style="vertical-align: center">


i recommend using the second one...is this what you're looking for? If not could you post a link to your problem page or something?

Reply

Wesbo
Is the problem solved already or not ?

Reply

synapticflame
QUOTE(http://www.w3.org/Style/Examples/007/center.html#vertical)
CSS level 2 doesn't have a property for centering things vertically. There will probably be one in CSS level 3. But even in CSS2 you can center blocks vertically, by combining a few properties. The trick is to specify that the outer block is to be formatted as a table cell, because the contents of a table cell can be centered vertically.

The url has more information: w3.org style example 7
If you want to be nice to poor old Internet Explorer, this page has information on the hack required for IE, and on combining the w3 approach with IE's kludge.

Reply

tihu
The simplest way is to have a table within a table.

Make a table with height="100%" and valign="center", like...

<table height="100%" valign="center">
<tr><td>
<!-- Put your table here -->
</td></tr>
</table>

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : css wasnt


    Looking for css, problem, wasnt, put

Searching Video's for css, problem, wasnt, put
advertisement



Css Problem... - Wasn't sure where to put this...



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE