1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

weird page break behavior when printing a css page

Discussion in 'CSS' started by deadwards, Nov 2, 2005.

  1. #1
    I'm having problems with a site i've styled using CSS. When I try to print out certain pages from the site, the content below the header jumps down to the second page. This only happens on seven out of eleven pages on the site. I'm going crazy trying to figure out what is going on. Any help would be very much appreciated!

    The site is: http://www.specialtyhealthpartners.com
    SEMrush
    Thanks!
     
    deadwards, Nov 2, 2005 IP
    SEMrush
  2. tresman

    tresman Well-Known Member

    Messages:
    235
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Background images are not visible on printed pages by default. The user choose to print them or not on his browser.

    If you just want to avoid that big blank space on the printed version, simply change this on the css print fily:

    Now you have

    
    #header  {
    	width: 760px;
    	height: 95px;
    	margin: 0;
    	padding:0;
    	background: url(/images/pg.hdr.top.jpg) no-repeat 50% 0;
    	}
    
    Code (markup):
    To avoid the blank space you should change it to:

    
    #header  {
    	display: none;
    	}
    
    Code (markup):
    And that's all. I would recommend to do a media print css that hides everything like menus and the like, as you do not needed them.
     
    tresman, Nov 3, 2005 IP