Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts

    can i do <br class="...."> ?

    i tried the following:

    Code:
    <style type="text/css" media="print"> 
    #notUnderlined { text-decoration: none}
    .Hide {  display: none; }
    .notPrinted { display: none; }
    .static-box { display: block }
    .onlyPrinted { display: block }
    #bottomMiddle {
     position: absolute;
     margin-left: 40%; 
     bottom: 0px;
     page-break-after:always; }
    </style>
    
    <style type="text/css" media="screen, projection">
    .notPrinted { display: block } 
    .static-box { display: none }
    .Hide {  display: none; }
    .onlyPrinted { display: none }
    ...
    </style>
    
    ...
    
    in body
    ....
    <div align="center"><a href="#" class="notPrinted" onClick="window.print();return false;" style="color:#0000FF" border="0">Click here to print this page</a></div> 
    <br class="onlyPrinted">
    <table ...>
    basically i want a space there only on the printout, because the print link is being removed and collapses a line down. cant i do <br class="onlyPrinted">?
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #2
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Nothing stopping you from doing so...

  • #3
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    the space shows on the screen...?
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #4
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why not just adjust the margins on surrounding elements, and forego the <br /> altogether?

  • #5
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    what about just adding a little extra margin or padding on the offending div in the printout rather than using a <br>?

    <edit> d'oh! man, you're fast...</edit>

  • #6
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    elaborate kind sir.

    basically because if this worked then it would be easier like this... why doesnt it work?

    afterthougt:
    should i do <br class="onlyPrinted"></br>

    would that do anything?
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #7
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Quote Originally Posted by canadianjameson
    elaborate kind sir.
    Well, if you had this:
    <style type="text/css" media="print">
    div {
    margin-bottom: 10px;
    }
    </style>

    <div>stuff that's going to be printed</div>

    ... then you wouldn't need to add a br at all. The printed part gets a little space added to it to make up for the link that disappears.

  • #8
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    cool, i'll try it later. i'm sick as a dog and about to pass out.

    thanks
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #9
    Regular Coder
    Join Date
    May 2004
    Location
    Minneapolis, MN, USA
    Posts
    904
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by canadianjameson
    basically because if this worked then it would be easier like this... why doesnt it work?
    maybe somebody's trying to tell you something...

    Why would more verbose and less intelligent CSS and markup be easier than less and more of each respectively?

  • #10
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    in short, because i wanted to

    i still do...

    any chance you could explain why my br thing isnt working?

    and besides, wouldnt adding more bottom padding simply extend it downwards?
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #11
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can put a class on a <br />. If you don't want that <br /> with the class to show up, set it to display: none. Otherwise, it's display: inline.

  • #12
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    but i tried (as seen in my first post in this thread) and the <br> showed up on the screen.

    what did i do wrong there?
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #13
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just for kicks, try putting TWO <br class="onlyPrinted" /> and see what that does... I'd have figured this would work.

  • #14
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    the blinkin br space still shows up on the screen!

    why god why!
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #15
    Senior Coder
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    1,223
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wait, just a space? As in it leaves a " " but doesn't do a line break?

    If that's the case... Remove all whitespace around your <br /> tag, maybe?


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •