Solved

table format using css

Posted on 2014-11-02
2
108 Views
Last Modified: 2014-11-05
I'm working on a form that prints out as a PDF.  I'm using css to style the page.  In the screenshot provided, what is the best way to use css to format the top table and middle table?

The top table has no border around the top left cell and the text needs to be aligned left top.  The middle table has a bunch of content within each table cell, which would be a nested table?

Thanks for any help!
Regards.
11-2-2014-10-40-42-AM.jpg
0
Comment
Question by:-Dman100-
2 Comments
 
LVL 25

Accepted Solution

by:
Kyle Hamilton earned 250 total points
ID: 40418306
mmm. fun.

I've had the great (mis)fortune of having to make one of these :)

http://roberttherealtor.com/URLA.php

If you "print" (to a printer, or pdf, or whatever output device), you can see that it will look like a regular paper form. It uses a print media query to do that.

The idea was to use a combination of relative and absolute div positioning which you can see if you view the referenced CSS file. It was quite tedious to put together, but does accomplish the task.

If you need any explaining, please let me know.
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 250 total points
ID: 40418324
Something like:

http://jsfiddle.net/t32tkh8w/1/

<table>
    <tr>
        <td></td>
        <td>County</td>
    </tr>
    <tr>
        <td>Primary Applicant</td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
    </tr>
    </table

Open in new window


table {
    width:100%
}
table tr:first-child td:first-child {
    border:none
}
td{
    border:1px solid black;
    height:50px;
    vertical-align:top;
    width:70%
}

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question