SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,023
    Mentioned
    62 Post(s)
    Tagged
    0 Thread(s)

    Is there a generic inline-block container?

    <div> is our generic block element.
    <span> is our generic inline element.

    Is there a generic inline-block element?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,146
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Using elements for their default display properties – you know better.
    The only code I hate more than my own is everyone else's.

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Michael Morris View Post
    Is there a generic inline-block element?
    No, I'm pretty sure there isn't. inline-block isn't even supported in quite a few older browsers, such as IE7 and under, FF2 etc.

    It's easy enough to set at element's display to inline-block via CSS, of course.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,295
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    No there's not a generic inline-block element although most replaced elements (such as images and inputs) behave like inline-block and can have dimensions applied.

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Generic is the give-away word and the answer is NO.

  6. #6
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,023
    Mentioned
    62 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oddz View Post
    Using elements for their default display properties – you know better.
    I do, but I'm thinking semantically - to make the sheet easier to read.

    I'm currently using class "cell" for inline-block behavior. So a generic inline block div is

    <div class="cell">

    Wouldn't it be easier to read if the element itself called this out.. maybe...

    <idiv>

    To be honest, this is more usable and pertinent than the section and aside tags they are kicking around.

    Because, and let's be clear here, creating a class for a single css behavior is almost no better than using inline css.


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
  •