SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting height on <br /> tag?

    I use a blog that wraps "paragraphs" between <br /> tags instead of inside <p> tags. Between two "paragraphs" it puts two break tags. That makes to large distance.

    Have tried to add line height or regular height to the <br /> tag in CSS, but no go.

    Any suggestions?

    Thanks

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use a blog that doesn't abuse markup for presentational issues?
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Evangelist praetor's Avatar
    Join Date
    Aug 2005
    Posts
    479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can try something like
    Code CSS:
    br
    {
     font-size: 2px; /* works on IE (7) */
     display:block; /* works on FF */
    }

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by praetor View Post
    You can try something like
    Code CSS:
    br
    {
     font-size: 2px; /* works on IE (7) */
     display:block; /* works on FF */
    }
    Thanks. Seems to work OK.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Use a blog that doesn't abuse markup for presentational issues?
    Abuse? It's not. The code validates just fine.
    Thanks.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,595
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Validation is only one part of correct HTML coding. If it is a paragraph it should be put in <p></p> tags. Using some other tag for a paragraph is wrong even if it does validate.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    Validation is only one part of correct HTML coding. If it is a paragraph it should be put in <p></p> tags. Using some other tag for a paragraph is wrong even if it does validate.
    No. It's recommended, but there's no such thing as "should" or "correct" as in implying that you know of some other, universal rule or law that applies.

    Let's not start a dogfight about "right" or "wrong", please. I respect people who prefer to create markup according to all "should" and "ought". So please accept when there are situations when other people are happy with a bit less strict code. Please?

  8. #8
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doodle, it seems as if you haven't understood HTML at all. It's not 'a bit less strict' to use random elements just because they happen to produce the desired rendering in most browsers. It's utterly wrong and it's detrimental to accessibility, maintainability, portability and a whole host of other -abilities.

    Marking up paragraphs of text with <p></p> is 'recommended' in the same way that beginning a sentence with a capital letter and ending it with a full stop is recommended. You can use all-lowercase and no punctuation, but you make it much harder to read and you run the risk of people misunderstanding what you're trying to say.
    Birnam wood is come to Dunsinane

  9. #9
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Doodle, it seems as if you haven't understood HTML at all. It's not 'a bit less strict' to use random elements just because they happen to produce the desired rendering in most browsers. It's utterly wrong and it's detrimental to accessibility, maintainability, portability and a whole host of other -abilities.

    Marking up paragraphs of text with <p></p> is 'recommended' in the same way that beginning a sentence with a capital letter and ending it with a full stop is recommended. You can use all-lowercase and no punctuation, but you make it much harder to read and you run the risk of people misunderstanding what you're trying to say.
    (ahem).... we're not talking about "using random elements" and I do understand html thank you very much.

    The practical difference of having plain text without wrapping instead of wrapped inside <p> tags is close to zero. And sometimes, I accept that as the option (install and hammer out another application) simply isn't even on the map.

    And, as I wrote: I respect your opinion. Please respect mine. I am not forcing my viewpoint upon you. Please don't force your's on me.

  10. #10
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by The Doodle Dandy View Post
    (ahem).... we're not talking about "using random elements" and I do understand html thank you very much.
    Yes, we are. If you use anything but <p> to mark up a paragraph, you're using random elements. Also known as 'tag soup'.

    I'm sorry, but it still appears to me that you don't really understand HTML at all.

    Quote Originally Posted by The Doodle Dandy View Post
    The practical difference of having plain text without wrapping instead of wrapped inside <p> tags is close to zero.
    Practical? For whom?

    Quote Originally Posted by The Doodle Dandy View Post
    And, as I wrote: I respect your opinion. Please respect mine. I am not forcing my viewpoint upon you. Please don't force your's on me.
    I'm not forcing anything. I'm just trying to explain to you that you seem to have missed the whole point of what HTML is for.
    Birnam wood is come to Dunsinane

  11. #11
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    I'm not forcing anything. I'm just trying to explain to you that you seem to have missed the whole point of what HTML is for.
    I got your message after your initial post.

    So, OK, I miss the "whole point" of html and I'm creating a "tag soup" and using "random elements" as I don't have time, energy or money to install a new app to make tex wrap in <p> tags instead of no tags at all.

    You win. I'm guilty as charged.


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
  •