SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 32 of 32
  1. #26
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    971
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Span tags are helpful for a lot of css techniques.

    image replacement:

    Code HTML4Strict:
    <a href="#" ><span>About us</span></a>
    In this method the contents of the span tag is hidden and the link has a graphical text background image.

    rounded corner box:

    Code HTML4Strict:
    <div class='promo'>
    <span class='top'>&nbsp;</span>
    Text goes here.
    <span class='bottom'>&nbsp;</span>
    </div>

    In this method the top and bottom span are filled with background images.
    This technique keeps display images out of your content, and has the benefit of being switchable. For example you could change a green box to a red box or a thin box to wide box just by changing the div class.

  2. #27
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,338
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by eruna View Post
    Code HTML4Strict:
    <div class='promo'>
    <span class='top'>&nbsp;</span>
    Text goes here.
    <span class='bottom'>&nbsp;</span>
    </div>
    see, that's what really frosts me about css

    what that code should look like is this --
    Code HTML4Strict:
    <p>Text goes here.</p>
    at the very most, i would tolerate this --
    Code HTML4Strict:
    <p class="foo">Text goes here.</p>

    i keep hearing this "mantra" about separating style from content, but when the rubber hits the road, i ain't seeing very much of it

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #28
    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 r937 View Post
    see, that's what really frosts me about css

    what that code should look like is this --
    Code HTML4Strict:
    <p>Text goes here.</p>
    Oh, I agree. And it could but unfortunately some people persist in using a browser that doesn't support CSS well enough for us to do that. Therefore we have to abuse the markup to cater for those luddites, even though there are good browsers available for free.
    Birnam wood is come to Dunsinane

  4. #29
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,338
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    that's a cheap shot, tommy

    just go ahead and write the html the way it should be written

    then let people like that idiot with the older browser see only the semantic markup, because you can use DOM tricks ("progressive enhancement") to add the cutesy bells and whistles and rounded corners

    yeah?

    by the way, your site is barfing up php error messages at the momoent

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #30
    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 r937 View Post
    that's a cheap shot, tommy
    I know! I just couldn't help myself.

    Quote Originally Posted by r937 View Post
    by the way, your site is barfing up php error messages at the momoent
    It's been doing that since October. The stupid web host f***ed something up, including the FTP password. The only thing that seems to work is his invoicing application.
    Birnam wood is come to Dunsinane

  6. #31
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    This is getting kind of funny...

    To me, I see no difference between \n (0x0D) inside of PRE and BR. BR means line-break... difference between that and the handling of a CR/LF and/or just LF (depending on how you handle them) is what exactly? No difference.

    BR exists BECAUSE HTML is white-space neutral. You turn off white-space neutrality with <pre> - what's the difference? NONE AT ALL.

    While paragraph is something entirely different as it has MEANING - it MEANS "this is a paragraph" -- which is why in my mind it's inappropriate to be slapping paragraphs around things that are NOT paragraphs of text (a couple anchors, just one image, etc).

  7. #32
    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 deathshadow60 View Post
    To me, I see no difference between \n (0x0D) inside of PRE and BR.
    If there is a difference, it's minute. The pre element type indicates that all white-space has some sort of semantic meaning, whereas a br element only indicates a semantic line break. But we're splitting hairs now.

    Quote Originally Posted by deathshadow60 View Post
    While paragraph is something entirely different as it has MEANING - it MEANS "this is a paragraph" -- which is why in my mind it's inappropriate to be slapping paragraphs around things that are NOT paragraphs of text (a couple anchors, just one image, etc).
    A paragraph can consist of a single sentence, and a sentence can – in extreme cases – be a single word (in a particular context). So 'a couple anchors' can be a paragraph (but they probably aren't in most cases).

    An image can definitely 'be' a paragraph; or, rather, the text equivalent (alt text) can be a paragraph. Again, in most cases it's probably not, so I'm not saying you're wrong … only that there are special cases where you're not right.
    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
  •