SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2011
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS correct way to go about this task?

    Hello to All,
    I have a PHP application which manages students that take a course.
    After they take a course the instructor must print a certification card for each student.

    The cards are on preprinted paper, and right now the school that I am doing this for uses Microsoft Word or Excel to line up the text with the card and then print each card.
    I need to print these cards from my PHP app.

    Is CSS the right way to go about this? Example.
    I need student name 40px from the top of the page and 100px from the left of the page.
    How should this be handled? Should i create DIVs first and then style text after?
    Im good a tinkering with CSS but not writing it.

    The card contains Student Name, Card expiration date, course ID, city, state, instructor name, etc.
    For each student a card needs to be created on a new card.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,203
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by xeonman13 View Post
    Is CSS the right way to go about this? Example.
    I need student name 40px from the top of the page and 100px from the left of the page.
    ... Should i create DIVs first and then style text after?
    That sounds viable. Wrap all of the content in a div with a top margin of 40px and left margin of 100px, then put the content inside there.

    Make sure to put these styles in a print style sheet, though:

    Code:
    <link rel="stylesheet" type="text/css" media="print" href="print.css">


Bookmarks

Posting Permissions

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