How does one create a lesser line break? (<br />)

Discussion in 'Web Design and Development' started by Fromethius, Aug 12, 2008.

  1. Fromethius macrumors member

    Joined:
    Jun 26, 2008
    Location:
    Pennsylvania
    #1
    I know of the br tag, but for one part on my website, I would like a line break that would around half of that of the traditional <br /> line break.

    I guess I could make a table with one data cell, or somehow change the em of the br tag in css, but I am not sure if that is the most elegant of solutions.

    Any ideas?
     
  2. angelneo macrumors 68000

    Joined:
    Jun 13, 2004
    Location:
    afk
    #2
    Personally I prefer just a div tag with a height attribute attached to it's css, using a table is an overkill here.
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    Use CSS, add padding, margin, or line height. Avoid using the br tag as well, it's rarely ever "needed."
     
  4. MegaMan1311 macrumors regular

    Joined:
    Jun 30, 2007
    Location:
    USA
    #4
    Could you explain to me why you shouldn't use it? I use it often myself, though recently, I have been replacing it with margin if I can. So is there any reason why you shouldn't use it other than css being able to replace it sometimes?
     
  5. Aranince macrumors 65816

    Joined:
    Apr 18, 2007
    Location:
    California
    #5
    I don't think there is a reason not to use it except that css makes it easier for you to change the look later.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    It also helps the strengthen the separation of layout from content.
     
  7. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #7
    Ditto to what Aranince and dejo said. It's all about using semantic HTML and having the separation of content (HTML), presentation (CSS), and behavior (JavaScript). This development scheme makes it easier to do future updates, organizes your efforts, and can make it easier for a team to work on a site. The br tag does have its place, but using it to increase some spacing is very much not one of them.
     
  8. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #8
    I prefer using 47eleven  . That always lines er right up! ;)
     
  9. Me1000 macrumors 68000

    Me1000

    Joined:
    Jul 15, 2006
    #9
    hahaha :D
     

Share This Page