Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

Any CSS Print gurus?

Status
Not open for further replies.
Joined
May 31, 2007
Posts
2,092
Reaction score
179
I'm trying to push a DIV to the bottom of a printed page, any suggestions? I can get it to the bottom of the viewport, but the printed page is another problem.

Needs to be the same on Mac & PC.
 
Never done any print css can you set a min-height in the previous div to push it down
 
How are you including it in the style sheet? The old way was a full css file for the stylesheet defined by a media print in the meta tag, the modern way is to use

Code:
@media print { … }
in your default css file and add the definition at the foot of the file.

How to put your div at the bottom depends on where the div is to start with. If the div is already the last div element then as a block element use something like { clear: both; width: 100% } to force the block to appear below the one above. If it's inside another div you can use the above to force it below the one above but will still be above any defined divs below it and within the parent container.
.
If you want it separate from other content then position: relative, position: absolute and position: fixed are all available where the div can be fixed relative to it's containing block - either if that is defined as position:relative, or the body/window if there is no relative container.

As I said, depends on where the div is.
 
Last edited:
Status
Not open for further replies.

Rule #1: Be Respectful

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Siusaidh AcornBot:
    Siusaidh has left the room.
      Siusaidh AcornBot: Siusaidh has left the room.
      Top Bottom