SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 68
  1. #26
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,147
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Semantic mark-up not CSS.
    The only code I hate more than my own is everyone else's.

  2. #27
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Can someone post an example of a form that has multiple inputs (username, password, e-mail. date of birth) using CSS (and not tables).
    Static forms are css-able no problem, with pretty simple CSS. Jeez, Tommy, how did you write that CSS from that other thread???? There should be a badge for that.

    Quote Originally Posted by Tommy
    Simple: display:table-cell. Unless you need it to work in browsers that don't support CSS2 (such as IE7 and older) of course.
    Uh-huh. We'd all love to live in that fantasy world... hell, I'd PAY to live in it. But I don't : )

    Also, I've run into issues with display: table in forms... though it would be fixed by adding yet another element to be "display: table-row" : )

    Quote Originally Posted by Tommy
    I assume this form you're talking about is generated dynamically by a server-side script or application? In that case, the script/app can easily count the lengths of the labels and set aside the appropriate space with an internal style sheet (<style>) attribute or even a style attribute. No need for tables, even here.
    Again, I'd love to live in that world. But if I'm Just Another Front-End Coder, trying to get the back-ender to script in widths is not possible. I can't even get them to stop adding <center> and <font> tags to my code, so no way I'm going to get the server-side to set widths.
    However I'm not saying this isn't an excellent idea, and one I would use (will use in the future) when I'm a back-end programmer.

    If it's not a dynamically generated form, you can just count the letters yourself and set your CSS accordingly. Using em as the unit makes this virtually painless.
    What I said too, I agree with this. I have only used tables once in forms, because they were actually tables that users filled in (on my link above). Though it's not painless-- wrapping labels mean their corrosponding inputs get a class, which pushes them down by about 1em (which of course isn't the same between Saffy/Chrome and Everyone Else) which, to tell the truth, I don't feel good adding manual classes to inputs because here the label wrapped and there it didn't).

    Quote Originally Posted by BrandonK
    <div class="formfieldgroup opt-text">
    <label>Label2</label>
    <input type="text" class="inputText" />
    </div>
    Quote Originally Posted by peach
    <div class="form-item">
    Actually, you can just
    <div>
    <label for="blah">text</label>
    <input type="text" name="foo" id="blah">
    </div>

    Div doesn't need a name really. If there's another div somewhere who's not doing the label-input pairing, then give THAT one the class. Otherwise,

    form div {
    wrap teh floatz;
    }
    I agree with Brandon that fieldsets are not appropriate for the sole purpose of making a block label-input pair. It's a styling hook, not a group of related questions.

    I posted this with a quick reply but don't see it anywhere so excuse if you see this twice..anyway I'm take a Web building class, we're on forms now and have been told to use tables to line up the form fields. Also, i have read sitepoints XHTML: Doing your website the right way and am reading XHTML Utopia and told to not use tables..but one more kick here is a quote from another book called XHTML Compreshensive from Thomson Course Technology this was written as a tip: quote "Notice that the form in the preceding example is contained with a table. Many web authors use tables to control the layout of forms on Web pages" unquote..so why so many tables? because that's what they are teaching us to use..
    Yeah a colleague of mine got one of those Bible books (they're a series), the XHTML Bible he got (pub 2004) has plenty of garbage in it. It looks like a new book, it's written with modern stuff in it, how's a newb like him to know what in there is toto cwap? I believe it also has forms in tables. Or lists. or whatever goofy thing people are putting in forms nowadays.

    Quote Originally Posted by telos
    I always do a list, which makes it easy to float items for columns.
    Or a div? Then you're not fighting a list's markup.

    I don't use lists for forms but I do keep thinking about it, mostly because often the instructions before a form say
    "Fill in the following list of questions..."
    So, apparently a lot of people don't believe a form is a sequence but a list, and I'm guessing that's because the questions are only useful as a group, and thus a list. Grocery list, form sign-up list...

    But I'm still dogmatically anti-list for purely religious reasons.

  3. #28
    SitePoint Wizard Darren884's Avatar
    Join Date
    Aug 2003
    Location
    Southern California, United States
    Posts
    1,616
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I prefer CSS, however when I work with designers they normally put them in tables because they don't know any better.
    Have a good day.

  4. #29
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Jeez, Tommy, how did you write that CSS from that other thread???? There should be a badge for that.

    It's fairly straightforward, except for circumventing a lot of Gecko bugs (and a couple of IE bugs).

    Quote Originally Posted by Stomme poes View Post
    Again, I'd love to live in that world. But if I'm Just Another Front-End Coder, trying to get the back-ender to script in widths is not possible. I can't even get them to stop adding <center> and <font> tags to my code, so no way I'm going to get the server-side to set widths.
    However I'm not saying this isn't an excellent idea, and one I would use (will use in the future) when I'm a back-end programmer.
    In all fairness, that's not because there's something wrong with CSS, or even browser implementations of CSS. There's just something wrong with your back-ender.
    Birnam wood is come to Dunsinane

  5. #30
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by adesignrsa View Post
    We're having a debate in the office over this.

    What is most practical and future proof with regards to the creation of web forms?

    We're talking pretty much across the board, from little 3 field contact forms through to multiple column registration forms asking for every detail of your life to date.

    What is your opinion of the matter?

    You dont need to debate this kind of topic. Its up to the choice you want.

  6. #31
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    There's just something wrong with your back-ender.
    Absolutely. The cause of my hair loss. However I'm not the only Front-Ender to work with such Back-Enders. And if that case appears, tables are the improper tool the FEer may need to use. Again, if we could CSS around dynamic labels of incredible length-diversity without needing to manually add a class here or there, then the BEer wouldn't be able to have any influence over the deal.
    The things tables automatically do for the cells in their rows are the reason they are still used in forms.

    Someone on both this forum and another is currently dealing with such a situation, and was trying to exit teh Tables (Mad Halfling). I guess it's up to the professionalism and knowledge of his back-ender to determine if he can use something else.

    Looking at figure 10 of the Sitepoint Forms article (lists, bah), I'd sure like to find a way to keep floats and yet use vertical-align to make the inputs stay at the bottom. This has been a requirement from everyone I've built a form for so far. Leaving it like Fig 10 isn't allowed, but that's the default behaviour of the inputs, to ride up as high as they can.

    Maybe Paul should make something like that for the next CSS Quiz? Because so long as my label text is a block I can't vert-align anything : ( Manually adding a class to every input in a wrapping label is terrible. There should be a way around that, and it seems the vert-align issue is what hits so hard with dynamic forms, and why people go to tables.

  7. #32
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BrandonK View Post
    Fieldset is for a group of fields. I use formfieldgroup (perhaps a poorly worded class name) as a way to group labels and their form fields together (basically combines the two fields into a single block element)
    That's what the for="" attribute on label is for. The way you are using labels at the moment is a bit useless - the user agent has no way of linking the label with the appropriate input element. Then you don't need the extra <div> elements anyway...

    I do forms like this:

    http://www.nugc.net/register/

  8. #33
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Stormrider:
    it looks like that form is relying on <br> in the code. Wrapping the label-input pair to make a single unit is what many people do who are allergic to br's in their code.

    Though Brandon's code didn't have the for attribute, that's not what the divs were doing. They were making a unit, so that if the labels are floated left, the inputs of questions further below can't ride their way up, lining up with the wrong label (a label-input pair can clear floats and prevent this).

    You can also make the label a block, wrap it around the input, float a span who's wrapped around the label text, but this triggered a bug in older Window-Eyes (dunno about version 7) and intermittantly in some Macs. So, I've been using this method for a lot of forms, but it might not be accessible.

  9. #34
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think using <br> is perfectly acceptable in some cases, to follow convention - and I think it is convention for form fields to be on a new line. Same goes for addresses.

    I've never had any trouble getting inputs and labels to line up, without using divs..

  10. #35
    SitePoint Mentor silver trophybronze trophy

    Join Date
    Feb 2008
    Location
    Preston, Lancashire
    Posts
    1,377
    Mentioned
    72 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by DelvarWorld View Post
    Thread should have been closed after this reply. This is not a topic to debate.
    yep. This is not a debate, nobody can possibly learn anything from this. Tables are uses for tabular data, not forms. It's easier using CSS anyway.

  11. #36
    SitePoint Mentor silver trophybronze trophy

    Join Date
    Feb 2008
    Location
    Preston, Lancashire
    Posts
    1,377
    Mentioned
    72 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by adesignrsa View Post
    I agree with you, and also agree that it is a topic that should be in bed.

    Problem is that there are still a lot of people (specifically programmers) that don't agree with the removal of the ease in layout using tables for forms.

    While I agree with you, I do understand their thinking.
    Many programmer's believe it or not, want to do something easy in terms of structure. They believe tables are solid (rigid), and therefore avoid CSS. One person at work claimed CSS floats everywhere, and he hates having to deal with them. Many don't even know CSS to a decent level to properly have it utilized.

    I had the same argument at work. Mine wasn't a debate, more of a shouting session. Eventually because he was of higher rank than me, I just had to take what he said. In order to keep on top you must evolve, if you don't you will end up loosing the game.

    Say if somebody has been working for 8 years in the web field, the chances are that CSS was not properly used in the beginning of his employment. Many employees have failed to evolve with the internet, mainly because of the lack of training supplied.

  12. #37
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I've noticed the code from programmers seems to be especially bad (unless they started out first as web developers).

    Classitis is a big one, because in many languages it's appropriate to give everything a class.

    I see strange indenting with lots of whitespace and people trying to get the = lining up when listing attributes.

    Because of HTML's tag soup past, I think a lot of programmers who keep their own code pristine and use Best Practices on their own code, throw all that out the window when they're dealing with "just a markup language."

    Many programmer's believe it or not, want to do something easy in terms of structure. They believe tables are solid (rigid), and therefore avoid CSS. One person at work claimed CSS floats everywhere, and he hates having to deal with them. Many don't even know CSS to a decent level to properly have it utilized.
    Yeah, I've heard that one too... "These floats everywhere don't make sense" and all that... http://www.bradcolbow.com/archive.php/?p=81
    : )

  13. #38
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I started out a programmer (non web), then did front end, then php. I consider myself to be reasonable at both front and back end... I was in the running for both CSS guru and Programming guru last year so hopefully can't be too bad!

  14. #39
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Can we stop spreading this FUD now?

    Quote Originally Posted by AutisticCuckoo View Post
    • forms are not tabular information and thus shouldn't be marked up as tables
    • tables for layout has been deprecated for over a decade
    Tables are not only meant for displaying tabular data. Applying layout with tables is perfectly fine by the W3C.

    The HTML table model allows authors to arrange data — text, preformatted text, images, links, forms, form fields, other tables, etc. — into rows and columns of cells...

    Tables should not be used *purely* as a means to layout document content…

    There you go “arranging forms and form fields” clearly means layout.
    The same could be argued about text, images, links, etc. W3C merely suggests using syle sheets, it does not however renounce tables as a method to apply layout.

    I am not arguing that layout should always be done with tables, instead I am trying to set straight inaccurate information spread unintentionally.

    Thanks

  15. #40
    SitePoint Mentor silver trophybronze trophy

    Join Date
    Feb 2008
    Location
    Preston, Lancashire
    Posts
    1,377
    Mentioned
    72 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by agnus View Post
    Tables are not only meant for displaying tabular data. Applying layout with tables is perfectly fine by the W3C.
    Do you have a link where is says this? I would be interested to know.

  16. #41
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agnus View Post
    Tables are not only meant for displaying tabular data. Applying layout with tables is perfectly fine by the W3C.
    You interpret W3C wording (which, by the way, is from 1998 – a lot has happened since then) differently from me. Perhaps one of us is guilty of wishful thinking? Whether it's you or me, I don't know.

    Quote Originally Posted by agnus View Post
    The HTML table model allows authors to arrange data — text, preformatted text, images, links, forms, form fields, other tables, etc. — into rows and columns of cells...
    Yes. That doesn't contradict what I said. You can have form fields inside a table if they are of a tabular nature.

    Quote Originally Posted by agnus View Post
    Tables should not be used *purely* as a means to layout document content…
    See? Your quote even supports my view on it.
    Using tables purely as a means to laying out a form's content is clearly(?) not recommended by W3C.

    At the end of the quoted sentence, they even say,
    &#91;A&#93;uthors should use style sheets to control layout rather than tables
    They are using a fairly mild language here (should, should not). No W3C SWAT team will come crashing through the window if you use layout tables, but they provide good reasons why you should use CSS instead.

    And, as I said, remember that this specification was written in 1998, when browser support for CSS was much, much poorer than it is today.
    Birnam wood is come to Dunsinane

  17. #42
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink

    Quote Originally Posted by Sega View Post
    Do you have a link where is says this? I would be interested to know.
    Ofcource I have a link, though I was not allowed to post direct links by the forum engine because I have less than 10 posts here. I'll try to work around:

    h t t p : / / w w w . w 3 . o r g [slash] TR [slash] html401 [slash] struct [slash] tables . html


  18. #43
    SitePoint Mentor silver trophybronze trophy

    Join Date
    Feb 2008
    Location
    Preston, Lancashire
    Posts
    1,377
    Mentioned
    72 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by agnus View Post
    Ofcource I have a link, though I was not allowed to post direct links by the forum engine because I have less than 10 posts here. I'll try to work around:

    h t t p : / / w w w . w 3 . o r g [slash] TR [slash] html401 [slash] struct [slash] tables . html

    Even though it says you can arrange text, images etc. within tables, do you know the negative affects of this when using screen-readers, and the excessive code which will negatively affect your SEO rankings.

  19. #44
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @AutisticCuckoo

    We have all heard the, rather successful, propaganda that demonizes any practice of applying layout with tables. Part of that is setting the false dilema of Tables vs CSS where there is none.

    As I said, I am not here to convince people to use one thing over the other. I am just trying to clarify that using tables for layout is not renounced or against the "standards" in any way.

  20. #45
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sega View Post
    excessive code which will negatively affect your SEO rankings
    I'd like some proof for that.

  21. #46
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agnus View Post
    As I said, I am not here to convince people to use one thing over the other. I am just trying to clarify that using tables for layout is not renounced or against the "standards" in any way.
    Yes, it is renounced. W3C is rather clear that table markup should not be used for layout purposes and that CSS should.
    Birnam wood is come to Dunsinane

  22. #47
    SitePoint Mentor silver trophybronze trophy

    Join Date
    Feb 2008
    Location
    Preston, Lancashire
    Posts
    1,377
    Mentioned
    72 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by agnus View Post
    I'd like some proof for that.

    "Here are some typical coding issues that can screw up your on-page optimization processes:

    1. Errors that prevent search engines from properly spidering your pages
    2. An extremely high code to content ratio
    3. Placement of content within the code structure
    4. Over-burdensome code creating longer-than-usual download time"

    http://www.searchengineguide.com/sto...at-is-jack.php

  23. #48
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Yes, it is renounced. W3C is rather clear that table markup should not be used for layout purposes and that CSS should.
    No, it is not. It only suggests otherwise.
    Last edited by agnus; Jun 12, 2009 at 12:51.

  24. #49
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Sega

    That is just a blog post, hardly proof.
    Last edited by agnus; Jun 12, 2009 at 12:52.

  25. #50
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by agnus View Post
    No, it is not. It just suggests otherwise.
    They say you should not use tables for layout and that you should use CSS instead. That's more than a suggestion.

    And, again, this was the phrasing they chose more than 10 years ago, when the practical choices were not as clear as they are today.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •