css for table print

Discussion in 'HTML & Website Design' started by pasam, Mar 23, 2009.

  1. #1
    ______________________
    | Name | | Age || Place|
    ______________________

    I want to diaplay like this

    _____________________
    |Name | Age | Place|
    _____________________


    How to achieve this using css.
     
    pasam, Mar 23, 2009 IP
  2. andy10k

    andy10k Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Post the code you have already, preferably with a link so people can have a look at it.
     
    andy10k, Mar 23, 2009 IP
  3. pasam

    pasam Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    When i display the Data i am using this css to Gridview


    .grid_view_header th
    {
    background-color:#BDBDBD;font-weight:normal;height:22px;text-align:center;	
    POSITION:static;TOP: -ms-expression(this.offsetParent.scrollTop-2);
    }
    
    Code (markup):
    .

    When I print Data
    
    .grid_view_header th{color:#666666;border-collapse:collapse;border-spacing:0px;margin-bottom:10px;margin-left:10px;margin-right:10px;margin-top:10px;font-size:10pt;border:2px solid #000;}
    
    Code (markup):
     
    pasam, Mar 23, 2009 IP
  4. andy10k

    andy10k Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Can I see the site it's on?

    Also, you have (this.offsetParent ... etc ) in there too. Do you know why that's there? I would be tempted to just simply code my table using css.

    Your first post isn't entirely clear. Is the top example what it looks like now, and the bottom example what you want it to look like? Or do you want the printed version different to the screen version?
     
    andy10k, Mar 23, 2009 IP