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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
tables-->CSS questions
Old 05-13-2007, 01:22 PM tables-->CSS questions
highanddry's Avatar
Close Talker

Posts: 880
Name: Jacob
Trades: 0
I havn't done a lot of codding/html since tables were in fashion. Now i'm learning simultaneously learning css and designing a new site. I have a few questions..

1.I have used the wc3 schools code validation tool and it says not "xhtml transitional", I put in a few major websites and according to the wc3 they all have multiple errors?

2.How the hell do I center my site? When ever I try With css, i can get it in the center, but not make it expand down when the browser's width is pulled in.

3. It seems that when I came back to design everyone was against tables. My site uses 95% css and a few tables just because old habits die hard and I don't know how to make divs do anything I want yet. Am I going to get **** from purists for using tables at all?
highanddry is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-13-2007, 01:35 PM Re: tables-->CSS questions
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
1.I have used the wc3 schools code validation tool and it says not "xhtml transitional", I put in a few major websites and according to the wc3 they all have multiple errors?
What 'major' websites ?? The W3C validator is far from perfect, but 'major' websites are not necessarily the best example of valid code. Sad to say, but all too true.

Quote:
2.How the hell do I center my site? When ever I try With css, i can get it in the center, but not make it expand down when the browser's width is pulled in.
To center using CSS you have to do 2 things:
1 - add text-align: center to the body to force IE to center
2 - add margin: 0 auto; to the container you want to center and also add text-align:left to that same container to put your text inside it back where it belongs.

That method requires that the container or "wrapper" that you want to center holds ALL of the content for your site AND that it has a defined width.

This method is not going to force a vertical stretch, for that you must use percentages or em units for widths on everything, and even that won't guarantee that divs won't reposition underneath each other.

Quote:
3. It seems that when I came back to design everyone was against tables. My site uses 95% css and a few tables just because old habits die hard and I don't know how to make divs do anything I want yet. Am I going to get **** from purists for using tables at all?
Well, I'm one of those purists . Tables for layout should NOT be used, they were never meant for layout, but in the old days that's all we had to control our layouts. Tables still have their place for TABULAR DATA.

For converting to table-less layouts, I highly recommend this book:
http://www.sitepoint.com/books/css2/
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-13-2007, 06:09 PM Re: tables-->CSS questions
highanddry's Avatar
Close Talker

Posts: 880
Name: Jacob
Trades: 0
Thanks for you detailed response, I appreciate that.

I really want to keep up to standards, but what is wrong with some tables? are they slower or just outdated?
Also I really cant figure out how to incorporate your advice on centering to my site. I have a main #pagecell div that has a defined height width etc.. and within that is contained many other organizational divs, content, images etc.. could someone give me a started code to show how centering my #pagecell to the middle of the browser and have it gradually move to the left as the browser is made smaller (pulled in)?

Thank you
highanddry is offline
Reply With Quote
View Public Profile
 
Old 05-13-2007, 06:18 PM Re: tables-->CSS questions
Skilled Talker

Latest Blog Post:
irish web design spammers
Posts: 76
Trades: 0
Quote:
Originally Posted by highanddry View Post
but what is wrong with some tables? are they slower or just outdated?

tables are ok for tabular data. just avoid them for layout...

to center a div, simply give it an auto margin..

Code:
#mydiv
{
margin:auto;
}
__________________

Please login or register to view this content. Registration is FREE
ukgamblingforum is offline
Reply With Quote
View Public Profile
 
Old 05-13-2007, 08:18 PM Re: tables-->CSS questions
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I already gave him the answer to centering, and it's not JUST margin: 0 auto - unfortunately. IE won't heed that rule.

As far as tables for layout -- read thru this presentation:
http://www.hotdesign.com/seybold/everything.html

If yoy'll post ALL of your code and CSS or a link to the problem page, it will be far easier to diagnose your centering problem.
You might also find this helpful:
http://css-discuss.incutio.com/?page...ngBlockElement
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-14-2007, 01:15 AM Re: tables-->CSS questions
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Quote:
Originally Posted by highanddry View Post
I really want to keep up to standards, but what is wrong with some tables? are they slower or just outdated?
If those are the choices, I'll go with outdated. It's really not a matter of speed, or even the size of the html document ( although if you do it right, divs and CSS come out much smaller than lots of <tr><td></td></tr> code ). Part of it is that the code is just easier to read and work on, and the main reason is that it's a good idea to use the tags as they were intended.

Html isn't like xml, where <table> could mean furniture, a database element, an html table, or something entirely different. In html, each tag has a well understood meaning. With a bit of hacking ( border="0", cellPadding="0", cellSpacing="0" ... colSpan="13" ... ) you can make a table to a lot to lay out a site, but that involves complicated hacks, and it's not what tables are really for.

If you believe all the hype about the web becoming more "semantic" and machine-readable, it will be less work to convert a site laid out in CSS than one using tables for placement.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 05-15-2007, 01:06 PM Re: tables-->CSS questions
Skilled Talker

Posts: 59
Trades: 0
One thing to rememeber: First cater for users and search engines.

It is correct tables are not for layout, but you could and can still use them to create grid'ish based layouts. For a long time they were the only workable option if you wanted browser compability (albeit it could require various "hacks"). That said, I would probably base new website / layouts on CSS and only use tables when somehow necessary.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
Thomas Schulz is offline
Reply With Quote
View Public Profile Visit Thomas Schulz's homepage!
 
Reply     « Reply to tables-->CSS questions
 

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.40702 seconds with 12 queries