Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShane Meikle
13,188 PointsWhy use tables instead of CSS for the form field?
Is there an advantage to using a table instead of CSS in this instance? For example, I added the following to the given CSS file instead of using the table as explained in the video:
label {
display: inline-block;
width: 100px;
text-align: right;
}
input {
display: inline-block;
}
Was the table route done for simplicity or is there a performance/layout advantage that can be explained to me?
1 Answer
Gareth Borcherds
9,372 PointsSomething tells me it was done out of simplicity. I like to avoid tables to do any normal styling. I would bet this is to not confuse people that haven't done anything with CSS that are doing the php class.
Shane Meikle
13,188 PointsShane Meikle
13,188 PointsFigured as much, thanks for the opinion.