CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 16th, 2003, 08:24 AM
syndrome syndrome is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Germany
Posts: 22 syndrome User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m
Reputation Power: 0
Defining centered "non-text" elements (CSS)

Hi,

i'm trying to define (for instance a table) to be centered on a page.
I couldn't find a possibility to do so. The only thing i could center was text. But as soon as it comes to centering something else than text it wouldn't work.
Of course I know that I could easely Center anything with the HTML Tag <center> but I am trying to define everything with css.
Does anyone have an idea how I can really center things other than text?

thx for replies, syndrome

Reply With Quote
  #2  
Old April 16th, 2003, 08:39 AM
binky's Avatar
binky binky is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Oct 2001
Location: New Zealand
Posts: 1,774 binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level)binky User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 58 m 15 sec
Reputation Power: 23
Erm:

style='text-align:center'

in the <body>

tag??
__________________
Smartfone Warehouse

Reply With Quote
  #3  
Old April 16th, 2003, 08:43 AM
syndrome syndrome is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Germany
Posts: 22 syndrome User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m
Reputation Power: 0
text-align(only text ?)

Yup, I have already tested the "text-align" option.
But as I see it this realy ONLY aligns my text and ignores other elements as especially tables.
I want to have my table centered and this does not happen using text-align : center.

Or am I wrong there and my browser loves its cache ?

thanks, syndrome

Reply With Quote
  #4  
Old April 16th, 2003, 08:57 AM
chillpad's Avatar
chillpad chillpad is offline
Traveler
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: UK
Posts: 45 chillpad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
Send a message via Yahoo to chillpad
<center>
<a href ="chillpadiscool.com">chillpad is cool</a>
</center>

__________________


(**Don't forget your towel**)

Reply With Quote
  #5  
Old April 16th, 2003, 09:02 AM
syndrome syndrome is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Germany
Posts: 22 syndrome User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m
Reputation Power: 0
<center>...nope...not what I want

Sorry, but as I already mentioned in my original text I don't want to use an HTML tag. Especially not <center>. That is because the <center>-tag is what w3c wants to quit being used. They rather want css to be used for everything concering layout. Thats why i'm wondering about how to center stuff without the <center> Tag.

anyway, thnx
syndrome

ps: <A Href...> is in my opinion a text-element which should be centable useing text-align. I want to center thins as tables: <table><tr><td>content</td></tr></table>

Reply With Quote
  #6  
Old April 16th, 2003, 09:38 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 3,009 Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level)Akh User rank is General 4th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Days 17 h 35 m 11 sec
Reputation Power: 1223

Reply With Quote
  #7  
Old April 16th, 2003, 11:47 AM
syndrome syndrome is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Germany
Posts: 22 syndrome User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m
Reputation Power: 0
thats it

Thanks, thats what I needed.
Though the solution seems quite strange to me.
I can't really follow how this is to center and why CSS doesn't have a more simple solution as may alignment:center.
I thought I had read about the alignment operator in CSS but it didn't work anyway.

Thanks, syndrome

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Defining centered "non-text" elements (CSS)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap