简体   繁体   English

该部分未显示在打印预览中?

[英]Section not showing on print preview?

This is probably something simple, but the Skills section on a site I'm working on for a friend (BrianCipoletta.com) isn't displaying on print preview. 这可能很简单,但是我正在为朋友工作的网站(BrianCipoletta.com)上的“技能”部分未显示在打印预览中。

The Skills section shows up fine there, but when you click Print up top or print preview, you can just barely make out (and select the top row), but nothing else shows. “技能”部分显示得很好,但是当您单击“顶部打印”或“打印预览”时,您几乎看不到(并选择第一行),但没有其他显示。 I've went into the print.css and I'm still at a loss. 我进入了print.css,但仍然茫然。

If anyone has a minute to take a look it would be greatly appreciated, thank you! 如果有人有时间看一下,将不胜感激,谢谢! The css files are... CSS文件是...

http://www.briancipoletta.com/css/style.css http://www.briancipoletta.com/css/style.css

http://www.briancipoletta.com/css/print.css http://www.briancipoletta.com/css/print.css

In your main document, give your .container element for the Skills section a unique id: 在主文档中,为“技能”部分的.container元素指定一个唯一的ID:

<div id="skillsContainer" class="container">

Then in your print CSS, add the following rule: 然后在您的打印CSS中,添加以下规则:

#skillsContainer {
  height: 200px;
}

The reason Skills wasn't showing up was because in the print view, all its children were absolutely positioned, so its height defaulted to zero. 未显示Skills的原因是,在打印视图中,其所有子级均已完全定位,因此其高度默认为零。

You may also want to tweak the CSS for your column-left , column-right , and column-center classes as well, as in the print view they are a bit taller (at 500px) than they need to be. 您可能还需要调整column-leftcolumn-rightcolumn-center类的CSS,因为在打印视图中它们比所需的要高一些(500像素)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM