CSS - Disable Css And Use Another In The Same Page?
Hi. Is it possible in the same page to use a css and in the middle of the page, disable it and use another for the rest page another? I know that if i include two similar css the last override the first in the whole page. Can i use them both ?
Similar TutorialsIs it possible to disable JavaScript with CSS? For instance, I need to disable a JavaScript popup on this site. The popup is triggered if the searched word isn't found in the dictionary. This site isn't mine, but I'd like to load it in a kind of frame. Hi there, In my stylesheet I've written a style for the table tag: Code: table { width: 500px; margin: auto; text-align: left; border: 1px solid #999999; font-family: "Trebuchet MS", "Bitstream Vera Sans", verdana, lucida, arial, helvetica, sans-serif; line-height: 140%; margin-bottom: 10px; padding-bottom: 15px; font-size: 14px; padding-left: 10px; } All the main tables on my site need to be this exact style. I now need to create a table which shouldn't use the table style above. I could have just pasted the stylesheet info directly to the page (and delete the css link at the top of the page), and then delete the table info, but can't do this because the stylesheet link location is dynamic (my new site design will alternate a stylesheet every 24 hours). Anyone know how I can tell the css to not apply the style to an element? Thanks, saj Can you use a stylesheet to effectively disable the link, so that you can't click on it; that it will appear simply as text? Thanks is there a way to disable the 3d shadowing effect on form fields? so i can just have a border. Hello I would like to change the cursor when it is over on a link with an defined file extension. It does not work well: the test.zip link is OK while the test.ZIP link does not have any effect. How can i disable the case sensitive in the following code so that work? Thank you PHP Code: <html> <head> <style type="text/css" media="screen"> a[href*=".zip"] {cursor:help;} </style> </head> <body> <a href="http://www.abc.com/test.ZIP">test.ZIP</a> <a href="http://www.abc.com/test.zip">test.zip</a> </body> </html> anyway to disable a user from viewing your css source? not particular for me but, i think there might be a way with php in the css file, but it still displays the code when i go to the file I would like to prevent safari from highlighting the field that has focus. Is this possible? I'm doing a similar effect on my site and it looks bad when they are combined. Thanks Hi, I need a class, that if I apply to a DIV tag (which has login form), It makes the background of that div a dull colored. Also I want to know if I need to force the user to first close that div before any other action outside the div. I hope this make sense. I am not sure if it can be done only with CSS or it also needs javascript. Whenever I roll out a new feature (including new layout) to the production version of a website I am working on, I know that it won't properly work until a user downloads a new version of the relevant CSS files. For new users this happens automatically, but existing users have to wait or hit refresh. The result is that the pages look bad for some users when I make changes. I would fix this problem by renaming the CSS files whenever I make changes, but this can get a bit unwieldy since I use SVN for source code management. I would have to make a revision to other source code files solely to reflect a change in the CSS file. Another idea is to control the name of the CSS file from a constant or from my database, but each has its downsides (complexity, performance in the case of the db calls). Is there any easy way to have caching of CSS files, but somehow break through that cache when I make changes? I am guessing not since the cache is based on expiration settings set by Apache, which to be meaningful need to be long. But if you have encountered this issue before, I'd love to hear what you did! I'm fighting with this for a while now. I want to change my table layout into div based one, but keeping all the positive features of table design. The layout is based on percents and em (the liquid philosophy) The problem: Make div resize like table cell with minimal width equal to width of widest unbreakable element. I don't want my "verylongunnecesaryword" stick out of menu div nor dissapear partaily when resizing the window. I basically want the menu to always stay wide enough to accomodate the longest word and resize dynamically with window and fonts. There is no such problem when using tables, cells automatically resize to fit content and never become so small that content sticks out or disappear. Setting the min-width with either em, px nor percent is a no go, because it's impossible to tell what size will the biggest element be. No javascript either. Also keeping it IE6 complaint would be good. I still think that tables are the best idea and unless someone shows me how to fix this problem with div and css, I'm just sticking with tables till the end of world. shortened HTML: Code: <div class="menu"> menu here </div> <div class="contents"> the rest of page </div> shortened CSS: Code: .menu {float: left; width: 20%; padding: 1%; } .contents {float: left; padding: 1%; width: 76%; } Forms are needed to submit values, of course. But they may also change the formatting on a page when included. If I want to include a form just to contain hidden input fields, or even include it otherwise for some other reason, it will affect formatting. Is there a way to disable all presentational effects caused by inserting a form tag? I'm assuming this would involve CSS. Skolem I am generating a list with PHP that is going to be printed out and hung up for display. I would prefer if the following weren't printed. 1) Top Left - Page Title (I know I can have this disappear by having a blank title, but I would prefer to have one) 2) Top Right - Page URL 3) Bottom Left - Page number (ex: 1 of 2) 4) Bottom Right - Date Is there any way to print the list without these? I wasn't sure if there is some css I can use, or if this is something that the printer prints automatically. Thanks Hi All : Currently i'm running in .NET platform together with VB.net and ASP. I faced a problem regarding to the PAGE BREAK html tag. The problem is when i want to print out a report, it will show with scroll bar and the report is very long. So what i have to do is to apply Page-Break-After/Before into the HTML. how am i know if the report already apply the Page Break function or not? And the only style i can use is CSS. Anyone familiar with this? It's urgent !! Hope can get anyone help asap. Regards, JeFFery Howcome: html, body { color: #06F; background-color: #000; font-size: 16px; text-align: center; width: 768px; } Doesn't center the page in the browser? How can I center it? Output example on my website here. I am trying to make a pattern tile the full height of the page and match up with an image at the top. It's a little bit hard to explain and a lot easier to show, so I've documented my first two attempts below. Failed Solution 1 - Pattern as a part of a div set at height: 100%; with outer divs also set at height: 100%; See attempt 1: Code: http://www.hesterdesigns.com/Web2/yellow.html Problem is that the divs aren't growing to the height of the page, and so the pattern isn't tiling the whole height of the page. Failed Solution 2 - The Pattern is part of the body background which tiles on y. See attempt 2: Code: http://www.hesterdesigns.com/Web2/index.html Any suggestions? I'm hoping to find a way to do this using only CSS and without having to resort to Javascript solutions. Hi, I have a front page which is one image only, no text. The image is centered horizontally (i.e. a simply text-align: center; ). My question is - how do I centre it vertically? (no matter what the resolution of the website visitor is). i.e. Currently the image is at the top of my screen. I would like it to be in the centre, both horizontally and vertically. Many thanks! Hello everyone, I've been working on my school website for some time now - but I recently started over where the markup and style sheets are concerned. Both my html and css validate. This is my html source: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Secondary School</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css"> <script type="text/javascript"> <!-- function view_event(url) { window.open(url, 'event', 'top=100, left=100, width=200, height=350'); return false; } //--> </script> </head> <body> <div id="container"> <h1> Secondary.School. </h1> <div id="nav"> <ul> <li> <a href="index.php"> Homepage </a> </li> <li> <a href="#"> School Information </a> </li> <li> <a href="departments.html"> Departments </a> </li> <li> <a href="#"> Clubs </a> </li> <li> <a href="#"> SCC </a> </li> <li> <a href="#"> Resources </a> </li> </ul> </div> <div id="primaryRail" class="rail"> <h2> Contact information </h2> <p> <b> 127 Maple Street Testo, Orbuk, H58 435 </b> <br /> <b> Telephone: </b> (456) 245-5677 <br /> <b> Fax: </b> (456) 456-4567 </p> </div> <div id="secondaryRail" class="rail"> <h2> Our administration </h2> <p> <b> Principal: </b> <i> Alan N </i> <br /> <b> Vice-Principal: </b> <i> Lucy S </i> <br /> <b> Vice-Principal: </b> <i> Candice H </i> </p> </div> <div id="primaryContent" class="content"> <h3> Welcome to the Secondary School website! </h3> <p><b>XHTML TESTING</b><br /> April 11, 2007<br /> Posted by : <b>admin</b><br /> Pellentesque sit amet mauris. Nullam non lacus. Etiam auctor. In purus. Nulla dolor lectus, posuere et, cursus a, tincidunt non, mi. Vestibulum interdum turpis in erat vehicula consequat. Vivamus sit amet turpis vitae massa tristique auctor. Mauris quis turpis. Quisque at mi. Suspendisse consequat faucibus elit. Morbi scelerisque porttitor ligula. Vestibulum non purus. <a href="#"> link testing </a><br /> <a href="#top">Top</a></p><p><b>admin</b><br /> April 11, 2007<br /> Posted by : <b>admin</b><br /> Pellentesque sit amet mauris. Nullam non lacus. Etiam auctor. In purus. Nulla dolor lectus, posuere et, cursus a, tincidunt non, mi. Vestibulum interdum turpis in erat vehicula consequat. Vivamus sit amet turpis vitae massa tristique auctor. Mauris quis turpis. Quisque at mi. Suspendisse consequat faucibus elit. Morbi scelerisque porttitor ligula. Vestibulum non purus. <br /> <a href="#top">Top</a></p><p><b>test</b><br /> April 10, 2007<br /> Posted by : <b>mr.southern</b><br /> test<br /> <a href="#top">Top</a></p><p><b>test</b><br /> April 10, 2007<br /> Posted by : <b>mr.s</b><br /> test<br /> <a href="#top">Top</a></p><p><b>Testing</b><br /> April 09, 2007<br /> Posted by : <b>Jonathan</b><br /> This is just a test message.<br /> <a href="#top">Top</a></p><p><b>test</b><br /> April 05, 2007<br /> Posted by : <b>test</b><br /> test<br /> <a href="#top">Top</a></p><p><b>Test</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> Test.<br /> <a href="#top">Top</a></p><p><b>Another test post.</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> Just another test.<br /> <a href="#top">Top</a></p><p><b>Lorem ipsum dolar et sit</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> This is just a test post.<br /> <a href="#top">Top</a></p><p><b>Lorem ipsum dolar et sit</b><br /> April 05, 2007<br /> Posted by : <b>Jonathan</b><br /> This is just a test post.<br /> <a href="#top">Top</a></p> </div> <div id="secondaryContent" class="content"> <h2>Calendar for April 2007</h2> <table> <tr class="days"><td>Su</td> <td>Mo</td> <td>Tu</td> <td>We</td> <td>Th</td> <td>Fr</td> <td>Sa</td> </tr> <tr><td class="week" title="Sun, 01st April 2007">1</td> <td class="week" title="Mon, 02nd April 2007">2</td> <td class="week" title="Tue, 03rd April 2007">3</td> <td class="week" title="Wed, 04th April 2007">4</td> <td class="week" title="Thu, 05th April 2007">5</td> <td class="week" title="Fri, 06th April 2007">6</td> <td class="week" title="Sat, 07th April 2007">7</td> </tr><tr> <td class="week" title="Sun, 08th April 2007">8</td> <td class="week" title="Mon, 09th April 2007">9</td> <td class="week" title="Tue, 10th April 2007">10</td> <td class="week" title="Wed, 11th April 2007">11</td> <td class="week" title="Thu, 12th April 2007">12</td> <td class="week" title="Fri, 13th April 2007">13</td> <td class="week" title="Sat, 14th April 2007">14</td> </tr><tr> <td class="week" title="Sun, 15th April 2007">15</td> <td class="week" title="Mon, 16th April 2007"><a href="calendar.php?dateline=1176699600" style="padding: 0px;" onclick="return view_event(this.href);"><span style="color: red; font-weight: bold;">16</span></a></td> <td class="week" title="Tue, 17th April 2007">17</td> <td class="week" title="Wed, 18th April 2007">18</td> <td class="week" title="Thu, 19th April 2007">19</td> <td class="week" title="Fri, 20th April 2007">20</td> <td class="week" title="Sat, 21st April 2007">21</td> </tr><tr> <td class="week" title="Sun, 22nd April 2007">22</td> <td class="week" title="Mon, 23rd April 2007">23</td> <td class="week" title="Tue, 24th April 2007">24</td> <td class="week" title="Wed, 25th April 2007">25</td> <td class="week" title="Thu, 26th April 2007">26</td> <td class="week" title="Fri, 27th April 2007">27</td> <td class="week" title="Sat, 28th April 2007">28</td> </tr><tr> <td class="week" title="Sun, 29th April 2007">29</td> <td class="week" title="Mon, 30th April 2007">30</td> <td class="week"> </td> <td class="week"> </td> <td class="week"> </td> <td class="week"> </td> <td class="week"> </td> </tr> </table> <a href="index.php?m=3">Previous month</a> <a href="index.php?m=5">Next month</a> <p style="font-weight: bold;">XHTML TESTING</p> <p style="font-weight: bold;">admin</p> <p style="font-weight: bold;">test</p> <p style="font-weight: bold;">test</p> <p style="font-weight: bold;">Testing</p> <p style="font-weight: bold;">test</p> <p style="font-weight: bold;">Test</p> <p style="font-weight: bold;">Another test post.</p> <p style="font-weight: bold;">Lorem ipsum dolar et sit</p> <p style="font-weight: bold;">Lorem ipsum dolar et sit</p> <p>Pellentesque sit amet mauris. Nullam non lacus. Etiam auctor. In purus. Nulla dolor lectus, posuere et, cursus a, tincidunt non, mi. Vestibulum interdum turpis in erat vehicula consequat. Vivamus sit amet turpis vitae massa tristique auctor. Mauris quis turpis. Quisque at mi. Suspendisse consequat faucibus elit. Morbi scelerisque porttitor ligula. Vestibulum non purus. </p> </div> </div> <div id="footer"> <p> <img src="images/tiger.jpg" alt="tiger logo" style="float: left;" /> | <a href="#"> homepage </a> | <a href="#"> school information </a> | <a href="#"> departments </a> | <a href="#"> clubs </a> | <a href="#"> scc </a> | <a href="#"> resources </a> | <br /> Copyright <span style="font-size: x-small;"> 2007 </span> Secondary School. </p> </div> </body> </html> And this is my style sheet: Code: /* Secondary School CSS Document /* Page and Link Formatting ---------------------------- */ a { text-decoration: underline; font-family: Georgia; padding-bottom: 3px; color: #FF42B1; } #nav a { text-decoration: none; font-family: Georgia; font-size: 12px; padding: 12px 10px 8px 10px; color: #F9F9F9; } #nav a:hover { background: #454545; } #nav li { display: inline; } body { background: url('images/header.png') repeat-x; margin: 0px; padding: 0px; text-align:center; } /* Divs etc... ---------------------------- */ #container { margin:0px auto; width: 700px; text-align: left; } #container h1 { margin-top: 60px; } #primaryRail { width: 350px; float: left; } #secondaryRail { width: 350px; float: left; } #primaryContent { margin: 55px 0px 0px 0px; width: 500px; float: left; } #secondaryContent { margin: 55px 0px 0px 25px; width: 175px; float: left; } #footer { clear: both; text-align: center; background: #EDEDED; border: #E2E2E2 2px solid; } /* Standard Elements ---------------------------- */ h1 { font-family: Georgia; font-weight: normal; font-size: 2em; color: #F9F9F9; } h2 { font-family: Georgia; font-weight: normal; font-size: 1.5em; color: #454545; } h3 { font-family: Georgia; font-weight: normal; font-size: 1.5em; color: #812F2F; } .rail h2 { color: #FFD11B; } p { font-family: Georgia; font-size: .85em; color: #454545; } .rail p { color: #F9F9F9; } .content p { line-height: 1.5em; } ul { padding: 0px; } li { list-style: none; } table { color: #AFAFAF; } td { padding: 5px; padding-top: 2px; padding-bottom: 2px; } .days { background: #DCDCDC; font-weight: bold; font-size: .75em; } .week { background: #FFFFFF; font-size: .75em; } .nomonth { background: #FAFAFA; } #swd_info { display: none; font-family: Verdana, Arial, Helvetica, sans-serif; position: absolute; width: 180px; background-color: #FFFF99; color: #000000; border: 1px solid #000000; padding: 3px; font-size: 10px; text-align: justify; } This is how it looks in FF, and that is how I would like to to be in FF, and any common browser that the user may be operating: img133.imageshack.us/my.php?image=ffexampletx6.jpg Thank you! Alright... I give up on this one. The copyright moves up and down by a pixel or two between different pages. Go from the Home page to the Diabetes page and look at the footer and you will see. I have tried changing the margins, padding, and line-height on the text in the footer. I can get it to temporarily work but as soon as I change anything above the copyright (i.e. in the #content div) like line-height, add text, and etc it moves the copyright between pages again. Basically the content div is pushing down on the copyright differently depending on the amount of text that is in the article. Because other than the text all the articles pages code is exactly the same. All the footer text is a PHP include if that makes a difference. Thanks for looking at it because I have been working on this for quite a few days now and it is buggin the ba-jesus out of me? I have a theory, the footer (thats where the copyright is) is absolute positioned. Therefore it is taken out of the flow of the document. Could this be the cause of my problem? So if I were to place all the copyright and footer links within another div within the footer div would that bring those back into flow? Like if I gave that new div a position of static or something? Or is it out of the flow regardless because it's sitting inside of an absolute positioned div? Thanks a lot - here is the site in question I could do this using Frames but I absolutely loathe them so I need to do it in CSS I have an A-Z across the top of the page which stays there while the results scroll below. Unfortunately, while I can do basic CSS, complicated stuff like this is way beyond me! Help would be most appreciated! Hey guys. You can run an image, a border, text, whatever you want off the top of the page, but can you do it with the bottom of the page. Code: .top { position: relative; left: 0px; top: -75px; } That will of course run an image off the top of the page, but Code: .bottom { position: relative; left: 0px; bottom: -250px; } this line of code will simply but the image relative to the top image and it's completely visible, meaning the user can view the entire image simply by scrolling down. I'm placing my <id>'s in tables right now, but I'm open to whatever. I simply want an image consistently, running off the top of the page and the bottom of the page at all times. Any ideas? Thanks in advance. |