SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast SoMBrA's Avatar
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What would you use here that fits in terms of markup...

    Hello guys, its my post here, but ive been around for a couple of weeks.

    Im in a small trouble, not a big deal i guess but i just want to keep things nice and clean (keep good habits with markup )

    So my problem is that i dont know what kind of markup to use to enclose results i get from a database query.

    DB returns information like, Username, Real Name, Country, City, E-mail adreess etc... My idea was to crete different <span> tags for each element and display them as a block (to have each result in different lines and give them some style afterwards)

    My question is if this is a good reason to use <span>... would you recommend any other markup/ideas? (i dont want to use tables to display it :P)
    Maybe a <div> to divide the content of the query in Personal Info, Site info and then each line within a span?

    Code:
    <div id="personal_info">
      <span>First Name: name_entry</span>
      <span>Last Name: last_name_entry</span>
      ...
    </div>
    <div id="site_info">
      <span></span>
    </div>
    And so on... Thanks everyone

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would depend on what the information is going to be used for. If the data is tabular in nature, then I'd use a table for it (since tables are meant for tabular data, not layouts). If it's a series of lists, then a list would be appropriate.

  3. #3
    SitePoint Enthusiast SoMBrA's Avatar
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello Dan, thanks for the answer.
    The problem is that i will use the information i get from the DB query to display the information inside a self-created interface (with images, tabs and so on), so i guess i will have to use markup that fits me

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't matter. What is the information going to be used for? Is it tabular information, is it a list of people and overviews of their sites or something else?

    I'm asking because right now I'm leaning towards the tabular option for this data.

  5. #5
    SitePoint Enthusiast SoMBrA's Avatar
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi again!
    It will display someones profile info (like members.php on this site forums) but the thing is that i would like to create my own interface to show that profile, so if i use a table to represent that wouldnt be hard to style it later? for example play with the values around and position them where i want etc...

  6. #6
    [Biped] LJK's Avatar
    Join Date
    Jun 2004
    Location
    In My Jammies
    Posts
    761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi -
    If it's a lot of members on one page, then I agree that a table would suit.

    If it's a single member, style as you see fit. Something like:
    Code:
    <div>
    <h#>First Name<span if="needed">Last Name</span></h1>
    <p>Site info...etc.</p>
    </div>
    Or break it down as you were planning but maybe simplify further:
    Code:
    <div>
    <p>
    <span>First Last</span>
    Site info...etc.
    </p>
    </div>
    Have fun,
    El
    F-Fox 2.0 :: WIN :: el design :: US

  7. #7
    SitePoint Enthusiast SoMBrA's Avatar
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks LJK

    Yes its a information display for a single member, not a big list (the previous step shows a big list with members on a table)


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
  •