4

I need to hide a column as well as other elements when my page is printed, and in order to do that I have a print style sheet, everything works fine, except for the column I want to make disappear, the strange thing is that my stylesheet works in IE, but it didn't in Mozilla and Chrome; why's that?

HTML code

   <col width="10%" class="art-editcolumn"/>

and here's the CSS class:

.art-editcolumn
{

   display: none;

}

Hope you can help me out with this.

2 Answers 2

3

The display CSS property is not allowed for the col tag. Only background, width and borders. So the standards based browsers are simply ignoring it.

Sign up to request clarification or add additional context in comments.

Comments

1

See the following entry for the <col> tag: http://www.w3schools.com/TAGS/tag_col.asp

You will note that only ONE attribute is supported in Firefox: 'width'

Also from that reference, the only CSS styles you can apply are 'background', 'width' and 'border':

Add the style attribute to the <col> tag, and let CSS take care of backgrounds, width and borders. These are the ONLY CSS properties that work with the <col> tag.

Hope that helps :)

2 Comments

and what should I do then? do I have to repeat the style for each cell, for each row??
Well you can't actually use the display:none; styling... Assuming the tag is where it belongs (inside a table) apply the style to the whole table...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.