CSS - Prevent 1 Field From Printing?
Hello,
I'm really bad with CSS, so this probably a simple question. I've found some stuff on the 'net about how to set up a class to prevent <body> from printing, but I just want to prevent one table element from printing while still allowing everything else. Example - on print, allow First Name but do NOT print SSN: Code: <table> <tr> <td> First Name </td> <td> SSN </td> </tr> </table> Similar TutorialsIm deriving a list of photos with information from my database. I want to be able to print the webpage off without any of the information being broken up between pages. Since its coming from the database I cant just use page breaks cause then I get one image per page. Is there a solution to this? I have a table that uses style sheets: <table class="Border"> but then when I place a table inside of it, it inherits the same class. Is there a way to prevent this? Thanks! Scott. I'm working with a portal system where-in various different modules can be applied to the main system. The problem I'm running into is when I want a module to have complete reign over it's appearance, completely ignoring the pre-set design of the surrounding system. Is there a CSS tag hiding somewhere that can disable all inheritance from the parent on up? I understand that styles declared closer to the output will take precidence, but I also don't feel like modifying the current and very complex stylesheet of a module I'm porting to make sure every attribute of every tag is being set to something compatible. Surely there must be a way to disable inheritance for a block...? I've got a side navigation that displays correctly in every browser EXCEPT IE 6. Big shock... I want the navigation DIV to only be as wide as the content inside it. It does this in IE7, FF, Safari, etc. Any help would be greatly appreciated. The CSS: Code: #nav { background-color: #fff; width: 218px; height: 400px; float: left } #menuContainer { margin-top: 120px; margin-left: 12px; position: fixed } #menuContainer h3 { font-size: 11px; font-weight: 900; text-transform: uppercase; margin: 0 0 4px } .menu { list-style: none; margin: 0; padding: 6px 0; border-top: 1px dashed; border-bottom: 1px dashed } .menu li { font-size: 20px; font-weight: 900; text-align: right; text-transform: uppercase; margin: 3px 0; padding: 0 } .menu a { color: #000; text-decoration: none } .menu a:hover {} .menu ul { list-style: none; margin: 0; padding: 0 } .menu ul li { font-size: 12px; font-weight: bold; line-height: 14px; text-transform: lowercase; margin: 0; padding: 0 } .menu ul a { color: #c00 } .menu ul a:hover { color: #000 } And the HTML: Code: <div id="nav"> <div id="menuContainer"> <h3>Site Name</h3> <ul class="menu"> <li><a href="...">Page</a></li> <li><a href="...">Page</a></li> <li><a href="#">Page</a> <ul> <li><a href="...">Page</a></li> <li><a href="...">Page</a></li> <li><a href="...">Page</a></li> <li><a href="...">Page</a></li> </ul> </li> <li><a href="...">Page</a></li> <li><a href="#">Page</a> <ul> <li><a href="...">Page</a></li> <li><a href="...">Page</a></li> </ul> </li> <li><a href="...">Page</a></li> </ul> </div> </div> Hi all, I am trying to prevent the highlighting of text on my site only on a product description. I currently employ techniques using the BODY tag, but I believe this is doing more harm than good because it does not allow highlighting/cutting in any other areas. I have seen some class(es) on other sites where highlighting was not permitting ONLY in the product description (a table) Is there a way to disable highlighting of text "IN A TABLE" via CSS or JAVA, and without the tricks of transparent layers and IFrames? Thanks much in advance So here's the deal. I need the nav buttons to stretch across so that it's flush with the gray background but when I add another pixel to padding-right:7px it wraps to the next line. I'm somewhat new to CSS so I don't know what to do to fix it. -Johnny Here is the code: /* ---------- Primary Nav ---------- */ div#primaryNav {clear:both;background-color:#EEEEEE;width:754px;} div#primaryNav ul {border:0;margin:0;padding:0;list-style-type:none;text-align:center;} div#primaryNav ul li {display:inline;float:left;text-align:center;padding:0;margin:0;padding-bottom:5px;padding-right:7px;} div#primaryNav ul li a {width:116px;height:17px;border:1px solid #D9D9D9;background:#FFFFFF;margin:0px;padding:0;padding-top:2px;color:#707070;display:block;text-align:center;text-decoration:none;} div#primaryNav ul li a:hover {} div#primaryNav ul li a.selected {font-weight:bold;color: #FFFFFF;background-color: #FFAB00;border: inherit #FFAB00;} Here is the navi: <div id="primaryNav"> <ul> <li><a href="Item">Item</a></li> <li><a href="Item">Item</a></li> <li><a href="Item">Item</a></li> <li><a href="Item">Item</a></li> <li><a href="Item">Item</a></li> <li><a class="selected" href="Item">Item</a></li> </ul> </div> This is a simple question. In my menu system, I want my "items" to look like links. I've put the text in an Anchor tag... but I then get the, for this time at least, undesired blue underline action going on... What CSS do I need to use to prevent this. I want my <div> tag and/or my <a> tags to not change... Thanks. Just wondering, is there a way to prevent the 2 div tag from overlapping each other?? Code: <html> <head> <style type="text/css"> #wrapper { MARGIN: 0px; PADDING: 0px; WIDTH: 100%; MIN-HEIGHT: 100%; BACKGROUND-COLOR: #55649D; BORDER-TOP: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ BORDER-RIGHT: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ BORDER-LEFT: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ BORDER-BOTTOM: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ } * html #wrapper {HEIGHT: 100%;} /* IE Hack since IE does not support "min-height" in the #wrapper*/ #footer { MARGIN: -65px 0px 0px 0px; PADDING: 0px; WIDTH: 100%; HEIGHT: 65px; BACKGROUND-COLOR: #00FF00; BORDER-TOP: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ BORDER-RIGHT: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ BORDER-LEFT: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ BORDER-BOTTOM: 0px solid black; /* Test/Debug, otherwise leave actual table border as 0px */ } </style> </head> <body> <div id="wrapper">blah blah</div> <div id="footer">blah blah</div> </body> </html> Thanks... FletchSOD Hi, i'm creating a page with div tags and it cause a probem when page is restored down (with browser, window).... I'm not sure where the problem is, please help me. This is the url ... http://tinyurl.com/3aknauy Additional ================== in this created webpage when i re size the page horizontally (X axis), in other words when i make the browser window small, contents of the web page go here and there. I guess it might be problem with div tags. But can't figure out what is the exactly. Hope you understood Is there a way to tell a browser to NOT zoom it when the user tries to zoom the text... I ask because I use text in a menu bar that I do not want to scale at all. Thanks I am trying to create a site with a footer below the content, and I want the footer to be at or below the bottom of the browser window (that is, on pages where the content is less high than the window, the footer should be at the bottom of the window, but on longer pages, the footer will be off the bottom of the browser window until you scroll down past all the content to see it). I've done this with the following code, where I have a DIV that's 100% high, then two futher DIVs inside this: one to contain the content of the page, and the second to contain the footer. The footer DIV is positioned with "bottom:0px" to make it appear at the bottom of the browser. This works fine, until the window is shrunk down, and then (I think because of the "bottom:0px") the footer DIV moves over the content DIV until its bottom is in line with the bottom of the content DIV. What I want to happen is that when the window shrinks, the footer moves up only until its top touches the bottom of the content DIV, and then if the window shrinks further, it will become invisibile until you scroll down. Please can somebody help me to acheive this? Many thanks, Gary Code: <body text="#000000" style="background-color:#008000; text-align:center; height:100%;"> <div style="background-color:#ffffff;text-align:left;margin-left:auto;margin-right:auto;position:relative;width:750px;height:100%;"> <div style="background-color:#0000ff;text-align:left;margin-left:auto;margin-right:auto;position:relative;width:750px;height:200px;"> </div> <div style="background-color:#00ff00;position:absolute; left:0px; bottom:0px; width:750px; height:100px; /*MainDivStyle*/" __AddCode="here"></div> </div> </body> Great forum been looking around but haven't seen anything that answers my question. I have a menu in wordpress witha drop down sub menu. The menu has a colored bar over the links that changes colors when a link is hovered or on the current page. Problem is this. The sub menu I want to be clean, but it is showing the bar over the link when one of those pages is current. Here is the html for the sub menu: Code: <ul class="sub-menu"> <li id="menu-item-539" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-539"><a href="http://gellyfish.com/led/portfolio/living-rooms-family-rooms/">living rooms + family rooms</a></li> <li id="menu-item-536" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-536"><a href="http://gellyfish.com/led/portfolio/kitchens-dining-rooms/">kitchens + dining rooms</a></li> <li id="menu-item-538" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-538"><a href="http://gellyfish.com/led/portfolio/bedrooms/">bedrooms</a></li> <li id="menu-item-537" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-537"><a href="http://gellyfish.com/led/portfolio/bathrooms/">bathrooms</a></li> <li id="menu-item-535" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-535"><a href="http://gellyfish.com/led/portfolio/before-after/">before & after</a></li> <li id="menu-item-542" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-542"><a href="http://gellyfish.com/led/portfolio/commerical/">commerical</a></li> </ul> Here is the CSS that I cant get to stop placing the bar on it.... Code: #access .current_page_item > a, #access .current_page_ancestor > a { color:#963300; background-image:url("images/redbar.jpg"); background-position:top center; background-repeat:repeat-x; } Here is the code I am trying to figure out how to stop the bar... Code: #acess ul ul li.current-menu-item a{ background-image:none;} I do want the red bar on the top menu, just not on the sub menu. I messed with this a million ways and dont seem to be able to get rid of the bar on top.. Any help is greatly appreciated. I have a container div that contains multiple divs floating left within it. The container css is Code: div.divContainer{ width:100%; } The child divs css is: Code: div.div1{ float: left; width:50%; } When the contents of the left div gets too large (and the browser window too small) the end divs wrap. I have researched this quite a bit and it seems like a solution is to give the container a fixed pixel width. I would like to keep it a relative width. Any ideas? I would even consider placing a horizontal scrollbar on the container rather than having it wrap Thanks Hello all, I am dynamicly creating a table with the following structu Code: <table id="plate_header"> <tr> <th><a class="header_link" href="link">Header 1<img src="arrow"></a></th> <th><a class="header_link" href="link">Header 2</a></th> <th><a class="header_link" href="link">Header 3</a></th> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> </tr> </table> with the following CSS: Code: table { padding: 1em; border: 1px solid #dddddd; } /* end table */ .cell { border: 1px solid #dddddd; } td { padding: 1em; } th { background: #206296; padding: 0 1em; font-weight: bold; color: #ffffff; } a:link.header_link, a:hover.header_link, a:active.header_link, a:visited.header_link { color: #ffffff; } #plate_table td { vertical-align: top; } The problem is in some cases, the <th> is the largest item in that column. So whenever the arrow image appears with it, it will be placed on a new line. How can I force it to be on the same line as the text? I have this structure setup in XHTML Code: <div class="contentShellHeader"> Header </div> <div class="contentShellContent"> Content </div> I'd like to have contentShellHeader's width to only be as wide as the text within it, but have contentShellContent be the width of the parent shell. Any idea how I can do this across all browsers? Hi! I"m wondering how do I prevent the <div> tag from introducing a line break in the web browser immediately after the closing <div> tag, or </div>.... <span> doesn't do that.... Read the article that <div> is a block elements where <span> is a inline element. So, the block element is what introduce a line break before and after the tag, just like the <p> tag for example... I have a page that displays text of an article. It's all contained in a <DIV>, of course. I'd like the "Print" option the allow the user to print out just the article, and not the rest of the crap on the page (ads, navigation, so on.) I know vaguely that you can have alternate style sheets for printing and other types of display, but how to include just the text in the output? Hi ! I've read that it's possible with CSS to adapt the visual style of a web page on the output medium. If I didn't understand that completely wrong, it means that with CSS I can format a String like "Hello World" to give him font size 10 in my browser and font size 20 if i print the page. Is this correct ? Does someone of you habe any kind of coding example therefore ? That would be great TIA Gawan Hello, I was wondering how to link to print a single ID without printing anything else... thanx=) Hiya, This page http://www.magikwebs.co.uk/ranch/indian.html wasn't printing too good so I've set up a stylesheet for print only, and it has improved, but it still doesn't quite look right. It leaves a big gap on page 2 and misses a line out. It looks 100% fine in Firefox. I guess it's an IE bug. Anyone know what it is and how to avoid it? Thanks, John |