Jump to content

Search the Community

Showing results for tags 'css'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 786 results

  1. Well, I'm trying to make it so that the slide ends on the last page and shows a sign that whoever's reading has reached the end, but I'm not too experient on JavaScript, could you guys help me on that? Here's the code: <html> <title>Terra Formars</title> <link href="https://www.w3schools.com/w3css/4/w3.css" rel="stylesheet"></link> <style> .mySlides {display:none} </style> <body> <div class="w3-container"> <h2> Leitor BETA</h2> <p>Capítulo 202 de Terra Formars.</p> </div> <div class="w3-center"> <div class="w3-section"> <button class="w3-button w3-light-grey" onclick="plusDivs(-1)">❮ Prev</button> <button class="w3-button w3-light-grey" onclick="plusDivs(1)">Next ❯</button> </div> </div> <div class="w3-content"> <img class="mySlides" src="https://i.ibb.co/fqQw2mX/00.png" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/CQ9VjsF/01.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/FVfsh9c/02.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/sq7czrk/03.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/By7k2J4/04.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/NnYp2xH/05.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/cXkgpK0/06.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/CW8fr43/07.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/LJ25GnH/08.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/Khbg5h9/09.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/wRrdp5T/10.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/TTnfdvv/11.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/72rLfpX/12.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/x8zR2yp/13.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/zXv7HJg/14.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/4tkwzt8/15.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/hHW04cS/16.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/dGx73nH/17.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/rx8G6Yr/18.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/4W1v7WS/19.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/qMYLTJz/20.jpg" style="width: 100%;" /> <img class="mySlides" src="https://i.ibb.co/3yG8h2N/22.jpg" style="width: 100%;" /> </div> <div class="w3-center"> <div class="w3-section"> <button class="w3-button w3-light-grey" onclick="plusDivs(-1)">❮ Prev</button> <button class="w3-button w3-light-grey" onclick="plusDivs(1)">Next ❯</button> </div> </div> <script> var slideIndex = 1; showDivs(slideIndex); function plusDivs(n) { showDivs(slideIndex += n); } function currentDiv(n) { showDivs(slideIndex = n); } function showDivs(n) { var i; var x = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("demo"); if (n > x.length) {slideIndex = 1} if (n < 1) {slideIndex = x.length} for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" w3-red", ""); } x[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " w3-"; } </script> </body> </html>
  2. In CSS how can I select an element based on whether it has an attribute or not at all?
  3. hdaumier19

    Problem with Photo Image Layout

    I am trying to design my own mockup website based on one of the W3 templates; however, I could not get the photo images to lay out on my website the same way as the W3 template. Here is the W3 template that I was talking about: https://www.w3schools.com/w3css/tryw3css_templates_photo2.htm. And here is the following codes that I came up with for my website. Any feedback will help. HTML <!doctype html> <html> <head> <title>Amy Perrales | Photographer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <link href="https://fonts.googleapis.com/css?family=Slabo+27px" rel="stylesheet"> <link rel="stylesheet" href="css/font-awesome.min.css"> <!-- !PAGE CONTENT! --> <div class="photography" style="max-width:1500px"> <!-- Header --> <header class="panel" style="padding:128px; 16px;"> <h1 class="ap-xlarge">PHOTOGRAPHER</h1> <h1>Amy Perrales</h1> </head> <body> <div> <id class="introduction"> <a href="Home" style="text-decoration: none;">Home</a> <a href="Portfolio" style="text-decoration: none;">Portfolio</a> <a href="About Amy" style="text-decoration: none;">About Amy</a> <a href="Contact" style="text-decoration: none;">Contact</a> </div> </header> <!-- Photo Grid --> <div class="half-width"> <img src="img/amusement_park.jpg" alt="amusement park" style="width: 599px; height: 424px;"> <img src="img/dock-1365387_640.jpg" alt="dock" style="width:550px; height:633px;"> <img src="img/kaboompics_Black baby chicks.jpg" alt="baby chicks" style="width: 342px; height:513px;"> <img src="img/sunset-114557_640.jpg" alt="sunset" style="width: 275px; height: 550px;"> <img src="img/wedding_couple.jpg" alt="wedding couple" style="width:550px; height:412px;"> </div> <div class="full-width"> <img src="img/ballet-437990_640.jpg" alt="ballet dancer" style="width:424px; height="640px;"> <img src="img/baseball.jpg" alt="baseball player" style="width:424px; height="640px;"> <img src="img/dancer-2471026_640.jpg" alt="dancer" style="width:424px; height="640px;"> <img src="img/pool.jpg" alt="children and pool" style="width:424px; height="640px;"> </div> <!-- Footer --> <footer> <i class="fa fa-facebook-square" style="font-size:36px;"></i> <i class="fa fa-twitter-square" style="font-size:36px;"></i> <i class="fa fa-instagram" style="font-size:36px;"></i> <i class="fa fa-pinterest" style="font-size:36px;"></i> <i class="fa fa-linkedin" style="font-size:36px;"></i> </footer> </style> </body> </html> CSS /* ========================================================================== Base Styles ========================================================================== */ body,h1 { font-family: 'Slabo 45px', serif; text-align: center; letter-spacing: 6px; color: #9aa6b1; } a { color: #a9b3bc; border: 3px solid #fba69d; padding: 8px; margin-left: 3px; margin-right: 5px; } img { margin-bottom: 128px; width: 100%; height: auto; }
  4. Truman

    Mozzila Firefox Inspector

    When I add element in "Search HTML" box that I want to find on page and it gives me several results. how can I see those that come after the first one? I don't see arrow or anything like that. For ex. when I add "id" for some page it gives me 9 results but I see highlighted only the first one. How to scroll to others?
  5. Sonalk

    Woocommerce dropdown menu

    Hello, so at the store page, when in mobile view the top dropdown menu doesn't work. When I delete parts bit for bit in the footer PHP file the menu will still not work. If I delete everything in the footer PHP file it will still not work. But if I completely change the PHP file name so it isn't linked to the store page at all, the dropdown menu works perfectly fine. I find this really weird and I can't figure out how to fix it. Can somebody help?
  6. AJ2021

    Nav bar spruce up

    Hi, I'm new to web design and need help w/ my nav bar. I need help spacing my page links on the nav bar as well as spacing my nav bar within the page. I have my nav bar spaced right now but I don"t know if it will work well w/my page and the page links aren't spaced correctly and I'm not sure how to space them. I also got my page links to be white but the rest of the words in the nav bar are still black & I want it white as well. Any help would be greatly appreciated. HTML: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Jackson Lawton_homePage</title> <link href="_CSS/main.css" rel="stylesheet" type="text/css"> </head> <body> <div id="wrapper"> <header> <h1>Jackson Lawton and Family</h1> <nav> <ul> <li><a href="index.html">Home</a> </li> <li><a href="contact.html">Contact</a> </li> <li><a href="media.html">Media</a> </li> <li><a href="gallery.html">Gallery</a> </li> <li><a href="resume.html">Resume</a> </li> </ul> </nav> </header> <section> <h1 id="pagename">Home</h1> <h2>Welcome to the Lawtons</h2> </section> </div><!-- end of wrapper --> </body> </html> CSS: @charset "utf-8"; /* CSS Document */ #wrapper { width: 1920px; min-height: 1080px; position: relative; margin: 0 auto; background-color: #5DD7FE } header { width: 1778px; min-height: 62px; background-color: #808080; position: absolute; top: 48px; left: 142px; } header h1 { font-size: 40px; color: #ffffff position: absolute; width: 425px; } header nav ul li { list-style-type: none; display: inline-block; } header nav ul li a { text-decoration: none; color: #ffffff; font-size: 18px; } header nav ul li a:hover { color: red; } header nav { position: absolute; top: 6px; left: 500px; } /* Style inputs with type="text", select elements and textareas */ input[type=text], select, textarea { width: 100%; /* Full width */ padding: 12px; /* Some padding */ border: 1px solid #ccc; /* Gray border */ border-radius: 4px; /* Rounded borders */ box-sizing: border-box; /* Make sure that padding and width stays in place */ margin-top: 6px; /* Add a top margin */ margin-bottom: 16px; /* Bottom margin */ resize: vertical /* Allow the user to vertically resize the textarea (not horizontally) */ } /* Style the submit button with a specific background color etc */ input[type=submit] { background-color: #4CAF50; color: white; padding: 12px 20px; border: none; border-radius: 4px; cursor: pointer; } /* When moving the mouse over the submit button, add a darker green color */ input[type=submit]:hover { background-color: #45a049; } /* Add a background color and some padding around the form */ .container { border-radius: 5px; background-color: #f2f2f2; padding: 20px; } Also line 24 which is position:absolute under header h1 in Dreamweaver is coming up as a problem and I can't seem to find out why. header h1 { font-size: 40px; color: #ffffff position: absolute; width: 425px;
  7. I have a sticky navbar which works fine until I add an image to my image box which at that point the sticky doesn't kick in until you scroll past the image. Any ideas as to what could be the cause of this it's driving me crazy? At least it's a short trip for me! <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { margin: 0; font-size: 28px; font-family: Arial, Helvetica, sans-serif; } .header { background-color: #f1f1f1; padding: 30px; text-align: center; } #navbar { overflow: hidden; background-color: #333; } #navbar a { float: left; display: block; color: #f2f2f2; text-align: center; padding: 14px 16px; text-decoration: none; font-size: 17px; } #navbar a:hover { background-color: #ddd; color: black; } #navbar a.active { background-color: #4CAF50; color: white; } .content { padding: 16px; min-height: 1000px; } .sticky { position: fixed; top: 0; width: 100%; } .sticky + .content { padding-top: 60px; } .imagebox{ position: relative; width: 100%; height: auto; padding: 0px auto; margin: 0px auto; } .loginbox{ position: absolute; float: right; top: 25px; right: 25px; width: 200px; height: 200px; padding: 15px; background-color: rgba(0, 0, 0, 0.25); } </style> </head> <body> <div class="header"> <h2>Scroll Down</h2> <p>Scroll down to see the sticky effect.</p> </div> <div id="navbar"> <a class="active" href="javascript:void(0)">Home</a> <a href="javascript:void(0)">News</a> <a href="javascript:void(0)">Contact</a> </div> <div class="imagebox"> <div class="loginbox "></div> </div> <div class="content"> <h3>Sticky Navigation Example</h3> <p>The navbar will stick to the top when you reach its scroll position.</p> <p>Some text to enable scrolling.. Lorem ipsum dolor sit amet, illum definitiones no quo, maluisset concludaturque et eum, altera fabulas ut quo. Atqui causae gloriatur ius te, id agam omnis evertitur eum. Affert laboramus repudiandae nec et. Inciderint efficiantur his ad. Eum no molestiae voluptatibus.</p> </div> <script> window.onscroll = function() {myFunction()}; var navbar = document.getElementById("navbar"); var sticky = navbar.offsetTop; function myFunction() { if (window.pageYOffset >= sticky) { navbar.classList.add("sticky") } else { navbar.classList.remove("sticky"); } } </script> </body> </html>
  8. Good afternoon. I have problem. I have 3 cards in a row. They work great. They have an image, a card title, and card text. The problem is when you display the page such that the text in the card title has to wrap. This pushes down the card text. So, when you look across the row, the card text is lower this one, higher that one, not aligned. I am not sure how to fix this. I tried setting a bigger margin bottom for the card title but that didn't work. Here is a picture of the problem. Ignore the dotted white lines. Was directly from Dreamweaver display. any ideas would be GREATLY appreciated. Thanks Card code in the page: <div class="col-lg-3 col-md-6 mb-4 column start"> <div class="card h-100"> <a href="http://help.cccis.com/static/ccc_one/training/Search%20Overview/Search%20Overview.htm" target="blank" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('searchov','','images/intro_3_demo.png',1)"><img class="card-img-top" src="images/intro_3_base.jpg" alt="Search Overview" id="searchov"></a> <div class="card-body"> <h4 class="card-title"> <a href="http://help.cccis.com/static/ccc_one/training/Search%20Overview/Search%20Overview.htm" target="_blank">Search Overview</a> </h4> <h5>ELearning</h5> <p class="card-text">This demonstration provides an overview of the search functionality.</p> </div> <div class="card-footer"> Duration: 10 mins </div> </div> </div> CSS bootstrap.css: .card { position: relative; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; min-width: 0; word-wrap: break-word; background-color: #fff; background-clip: border-box; border: 1px solid rgba(0, 0, 0, 0.125); border-radius: 0.25rem; } CSS bootstrap.min.css for the cards: (apologies for the wall o'text - its from a template) .card {position:relative;display:flex;flex-direction: column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0, 0, 0, 0.125);border-radius: 0.25rem}.card > * {flex: 0 0 auto}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-body{width:100%;-ms-flex:auto;flex:auto;padding:1.25rem}.card-title{width:100%;margin-bottom:1.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{width:100%;margin-bottom:0}.card.h-100 .card-body .card-text { }
  9. First of all, I'm no way near any skilled "programmer" or website builder, I mostly just copy things and modify the styles and stuff! So this is probably a nooby question, you have been warned. I've this website I'm building for a school project and I've a few problems left and I've given up trying to fix them, I need to start working on other stuff. First of all so am I trying to get this slider between the three pictures and the navigation bar in the supposedly start page, but the animation disappear when you put it in and I don't think the autoplays work either. This is the main thing I'm trying to do. Secondly, When you go on mobile view and press the dropdown menu it doesn't seem to find the script, which i don't understand why. In the header I have <script src="/online-store-header/js/flertdown.js"></script> and the body I've the code <a href="javascript:void(0);" style="font-size:25px;position: absolute; top: 65px; right: 0; border: 0;" class="icon" onclick="specificName()">☰</a> The console returns this error: Uncaught TypeError: Cannot read property 'className' of null at specificName (flertdown.js:3) at HTMLAnchorElement.onclick (final.html:195) Dropdown js code Any help would be really appreciated, i really need to be done this site soon :)) And I'm really sorry if the index file is totally chaos, elements seems to have a life of their own and come back and reproduce to multiple of the same element after I've deleted them, I've lost control of what i've created (or copied)
  10. So I've searched the web and tried for hours now and I'm just giving up. I've this header, and I want it so when you're on mobile it looks like something like this. So when you're on desktop the full menu is in the header and if your're on mobile you get a dropdown menu. Can someone tell me how I do this? Thank you
  11. CSS grid is considered to be one of the biggest revolution in the web design industry. CSS grid solved a number of commonly experienced web design problems by web designers all over the world. GRID CSS was introduced to work best in cases of full-page layouts where it has even brought considerable opportunity in terms of reordering and structuring for various media queries. Although it is widely observed that the web development London industry has started reshaping faster since the demand for mobile platform increased and still web designing experts have continued to bring further advancements and improvements in the area of existing frameworks and techniques.
  12. BACKGROUND: I have a flexbox (#contact_div) that creates a column of rows (.content_item). Each row represents another flexbox that is divided into two columns (.contact_info and .contact_data). Now, each row of columns is neatly spaced across the entire width of the parent #contact_div when in full-screen browser mode. As the width of the viewport is made smaller, however, spacing problems begin to arise. in smaller viewports the width of each row is no larger than that of the widest content contained in each of the two columns. I would like the columns to fill the entire width of the original box (contact_div). I have experimented with the flex statement, but to know avail. #contact_div { display: -webkit-flex; display: flex; flex-direction: column; justify-content: start; } .contact_item { display: -webkit-flex; display: flex; flex-direction: row; justify-content: space-between; flex-wrap: wrap; } .contact_info { padding: 0 1em; font-variant: small-caps; font-weight: bold; text-align:right; color: #4E7F4E; } .contact_data { padding: 0 1em; } You can find a visual display of the problem by clicking on the option Info in the Contact menu in the navigation bar of the Grammar Captive mainpage. After the panel has been inserted narrow your viewport and observe how the problem appears and then disappears as you narrow your viewport ever further. This problem does not appear to be smartphone related. CSS strikes again! QUESTION: Any ideas? Roddy
  13. BACKGROUND: In an effort to obtain good responsive design I feel compelled to leave out certain elements that are unresponsive. I am loathe to do this. I have identified the element that is causing the distortion. The element retrieves and displays the referring URL. Unfortunately, in its effort to render the URL fully, the element causes the div to extend beyond the boundaries of the viewport and distorts the page. Now, I have tried to overcome this problem in the following manner, but it fails. #yp_container #current_referral_url { max-width: 100%; overflow-wrap: break-word; } Is there a better way to break up the URL so that it fits? Roddy
  14. BACKGROUND: In my most recent effort to fix the alignment problems associated with the responsive design of my site's mainpage I have managed to overcome several important hurdles. There does remain one problem, however, that I cannot seem to fix. This has to do with the rendering of inserted div elements in my site's mainpage. By way of example 1) Open Grammar Captive's mainpage in a smartphone -- preferably iPhone, for this is where I have detected the problem. 2) Click on the About option under Introduction in the navigation bar. The insert appears correct. No background color has been set. 3) Click on the Free Consultation option under Introduction where the background color has been set and notice the alignment failure in the left margin. Now, follow the same three steps, but with any browser on a normal computer, but achieve the affect by narrowing your browser window. The alignment problem does not occur. By the way, when I turn my phone sideways, the problem goes away. QUESTION: What might be causing the above described inconsistency? Roddy
  15. JohnDahl

    w3 framework menu close animation

    I have been debating whether to use a canned framework or not (versus raw css) and am still on the fence. Twitter bootstrap seemed bloated to me when I tried it, so today I played around with w3's framework. It's nice, but I feel like I have ZERO control (or at least I can't control it....). The example framework I kicked around a while is this one: https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_templates_portfolio&stacked=h The thing I HATE is how the side menu pops up automatically when the window is enlarged. So I just spent literally two hours trying to figure out how to keep this from happening, and failed. Viewing the source in firefox (via F12) I can see the container change with a "before" keyword popping up, but HOW? Is there a way to change this behavior?
  16. Hello everybody, I was playing with a template from the w3.css templates from w3 schools and found an issue that I can't get around. In the template called Parralax template or the forth one from top, with the man with grey hat, I saw that the home screen image was loaded from the css .bgimg-1{ min-height: 100%; background-image: url(/w3images/parallax1.jpg); } (from the style brackets after the head tag ) I wanted to do a transition between two images but only found examples on the web that it is possible only when the image is loaded from an html image tag, so I removed the "background-image" from the above css code and added an <img src="/w3images/parallax1.jpg"> tag under the div where the class name was bgimg-1: <!-- First Parallax Image with Logo Text --> <div class="bgimg-1 w3-display-container w3-opacity-min" id="home"> <img src="/w3images/parallax1.jpg"> <div class="w3-display-middle" style="white-space:nowrap;"> <span class="w3-center w3-padding-large w3-black w3-xlarge w3-wide w3-animate-opacity">MY <span class="w3-hide-small">WEBSITE</span> LOGO</span> </div> </div> However, the image now has an empty white space from it's right side and I can't make it full. Does anybody know how to fix that?
  17. WHO: A problem for Dsonsuke. BACKGROUND: In a recent effort to make my website responsive, I have run into trouble with my website. DILEMMA: I have five panels that appear correctly in two (wide viewport and narrow viewport) of three instances (wide viewport, middle viewport, and narrow viewport). It is the middle viewport that I cannot get to appear correctly, and I do not know what is causing the problem. When one adjusts the browser window from wide to narrow, and the three horizontally aligned panels are reduced from three to two, the contents of the middle panel is no longer centered and the left-margin appears exorbitantly large. Please see, the Grammar Captive mainpage before commenting. Roddy
  18. Hello. I am using a bootstrap responsive ecommerce template. The filter buttons work great! BUT, if you click on a "card" or even on the background, the outline around the button disappears. This is a problem that the original W3 example doesn't have. Any ideas would be greatly appreciated. Here is the original: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_portfolio_gallery_filter Here is mine: Here is the page: http://help.cccis.com/static/ccc_one/ELCTraining/EstWorkRO.html Here is the filter buttons: <div id="myBtnContainer"> <button class="btn active" onclick="filterSelection('all')">Show all</button> <button class="btn" onclick="filterSelection('estimates')">Estimates</button> <button class="btn" onclick="filterSelection('workfiles')">Workfiles</button> <button class="btn" onclick="filterSelection('ros')">ROs</button> <button class="btn" onclick="filterSelection('checklist')">Direct CheckList</button> <button class="btn" onclick="filterSelection('share')">Estimate Share</button> <button class="btn" onclick="filterSelection('touch')">Touch</button> </div> </div> Here is the javascript: <!-- Bootstrap core JavaScript --> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script> filterSelection("all") // Execute the function and show all columns function filterSelection(c) { var x, i; x = document.getElementsByClassName("column"); if (c == "all") c = ""; // Add the "show" class (display:block) to the filtered elements, and remove the "show" class from the elements that are not selected for (i = 0; i < x.length; i++) { w3RemoveClass(x, "show"); if (x.className.indexOf(c) > -1) w3AddClass(x, "show"); } } // Show filtered elements function w3AddClass(element, name) { var i, arr1, arr2; arr1 = element.className.split(" "); arr2 = name.split(" "); for (i = 0; i < arr2.length; i++) { if (arr1.indexOf(arr2) == -1) { element.className += " " + arr2; } } } // Hide elements that are not selected function w3RemoveClass(element, name) { var i, arr1, arr2; arr1 = element.className.split(" "); arr2 = name.split(" "); for (i = 0; i < arr2.length; i++) { while (arr1.indexOf(arr2) > -1) { arr1.splice(arr1.indexOf(arr2), 1); } } element.className = arr1.join(" "); } // Add active class to the current button (highlight it) var btnContainer = document.getElementById("myBtnContainer"); var btns = btnContainer.getElementsByClassName("btn"); for (var i = 0; i < btns.length; i++) { btns.addEventListener("click", function () { var current = document.getElementsByClassName("active"); current[0].className = current[0].className.replace(" active", ""); this.className += " active"; }); } </script> If you click on a filter button, it works. But if you click on the background, the button does not stay highlighted. HELP!
  19. Hi, I searched the forums but haven't found an answer about this. I have created a simple eBay template based on w3.css inline style sheet. When I paste into the eBay form it passes checks and the mobile test also works. When I publish the advert, however, the images in Chrome, IE, Firefox (latest versions) all are fixed at original size. If I browse from my mobile phone, however, the resizing works well and appears as intended. Any idea why it doesn't work on desktop browsers? Advert is here: https://www.ebay.co.uk/itm/202385270343 and the template I created: <!DOCTYPE html> <html> <title>Keith eBay Template 2018</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway"> <style> body,p,a,h1,h2,h3,h4,h5 {font-family: "Raleway", sans-serif} </style> <body> <div class="w3-container w3-light-green"> <h2>Harry Potter and the Philosopher's Stone</h2> <h4>Ted Smart First Edition, Hardback, 3rd Print</h4> <div class="w3-panel w3-round-large w3-khaki"> <h3>Description</h3> <p>This is an auction for my Harry Potter and the Philosopher's Stone Ted Smart First Edition. It is a 3rd Print as you can see from the inside cover. These are still highly sought after and I'm sure will continue to gain value over time!</p> <p>This edition has lived for at least 10 years in a box in a cool dry cupboard, and prior to that on a shelf in the shade so the cover hasn't faded at all. There is a little wear that can be seen to the top edge of the sleeve but there are no marks on or in the book itself.</p> <p>How do you identify which edition and print run? I found the following link helpful:</p> <p></p> <a href="https://www.peterharrington.co.uk/blog/is-my-harry-potter-book-valuable-2/" target=_blank">Peter Harrington - Is my Harry Potter Book Valuable</a> </p> </div> <div class="w3-panel w3-round-large w3-khaki"> <h3>Shipping</h3> <p>I will ship this item using the Hermes ParcelShop service. If you would like me to use an alternate courier please contact me. </div> <div class="w3-panel w3-round-large w3-khaki"> <h3>Photographs</h3> <img class="w3-image w3-round-large" src="https://image.ibb.co/gFRCJo/IMG_2036.jpg" style="width:100%"> <img class="w3-image w3-round-large" src="https://image.ibb.co/jn5sjT/IMG_2041.jpg" style="width:100%"> <img class="w3-image w3-round-large" src="https://image.ibb.co/iGJWB8/IMG_2037.jpg" style="width:100%"> <img class="w3-image w3-round-large" src="https://image.ibb.co/cBfiPT/IMG_2039.jpg" style="width:100%"> <img class="w3-image w3-round-large" src="https://image.ibb.co/kzuk4T/IMG_2038.jpg" style="width:100%"> </div> </div> </body> </html>
  20. I have an html email template with social media icons in the footer. When viewed on mobile devices for some reason they are stacking vertically. Below is the footer code <tr> <td align="center" style="-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" valign="top"><!-- BEGIN FOOTER // --> <table border="0" cellpadding="0" cellspacing="0" id="templateFooter" style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; background-color: #FFFFFF; border-collapse: collapse !important; border-top-color: #FFFFFF; border-top-style: solid; border-top-width: 1px; mso-table-lspace: 0pt; mso-table-rspace: 0pt" width="100%"> <tbody> <tr pardot-removable=""> <td align="left" class="footerContent" pardot-data="link-color:#ffffff;" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-family: Helvetica; font-size: 10px; line-height: 15px; text-align: left; padding: 20px; background: rgb(55, 59, 58);" valign="top"> <div>&nbsp;</div> <div style="text-align: center;"><img alt="Partner Logos" border="0" src="http://info.mission43.org/Mission43_PartnerLogos_Group_WHITE" style="border-width: 0px; border-style: solid;"><br> <br> <a href="https://www.facebook.com/Mission43Idaho/" style="text-size-adjust: 100%; font-weight: normal; color: #ffffff;"><img alt="Facebook" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mjc/427472/270350/light_facebook_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a><a href="https://www.instagram.com/mission43/?hl=en"><img alt="Instagram" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mj9/427472/270348/light_instagram_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a><a href="https://www.linkedin.com/company-beta/10843452/"><img alt="LinkedIn" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mhy/427472/270344/light_linkedin_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a><a href="http://www.mission43.org/"><img alt="Mission43" border="0" height="24" src="http://info.mission43.org/l/427472/2017-10-04/7w1mj1/427472/270346/light_link_48.png" style="width: 24px; height: 24px; margin-left: 15px; margin-right: 15px; border-width: 0px; border-style: solid;" width="24"></a></div> </td> </tr> <tr> <td align="left" class="footerContent" pardot-data="link-color:#ffffff;link-underline:underline;" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-size: 10px; line-height: 15px; text-align: left; padding: 0px 20px 20px; background: rgb(55, 59, 58);" valign="top"> <hr> <div style="text-align: center;"><a href="http://www.jkaf.org/" style="color: rgb(255, 255, 255);"><img alt="" border="0" src="http://info.mission43.org/l/427472/2017-10-04/7w1mhw/427472/270342/JKAF_Logo.png" style="border-width: 0px; border-style: solid;"></a></div> <div style="text-align: center;"><strong>Our mailing address is:</strong>%%account_address%% <hr><em>Copyright © %%current_year_YYYY%%, All rights reserved.&nbsp;</em>J.A. and Kathryn Albertson Family Foundation. You are receiving these emails because you provided Mission43 with your email address and have been in contact with us. You can update your contact information, or if you no longer wish to receive these types of emails you can <a href="%%unsubscribe%%" style="color: rgb(255, 255, 255);">unsubscribe from this list</a></div> </td> </tr> <tr> <td align="left" class="footerContent original-only" pardot-data="link-color:#ffffff;" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-family: Helvetica; font-size: 10px; line-height: 15px; text-align: left; padding: 0px 20px 20px; background: rgb(55, 59, 58);" valign="top"><a href="%%unsubscribe%%" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-weight: normal; text-decoration: underline;">unsubscribe from all emails</a>&nbsp;&nbsp;&nbsp;<a href="%%email_preference_center%%" style="text-size-adjust: 100%; color: rgb(255, 255, 255); font-weight: normal; text-decoration: underline;">update subscription preferences</a>&nbsp;</td> </tr> </tbody> </table> <!-- // END FOOTER --></td> </tr> Not sure if the fix needs to be in the footer or the CSS so I am including my CSS as well. <style type="text/css">#outlook a { padding: 0; } .body{ width: 100% !important; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 0; padding: 0; } .ExternalClass { width:100%; } .ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; } img { outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; } a img { border: none; } p { margin: 1em 0; } table td { border-collapse: collapse; } /* hide unsubscribe from forwards*/ blockquote .original-only, .WordSection1 .original-only { display: none !important; } @media only screen and (max-width: 480px){ body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:none !important;} /* Prevent Webkit platforms from changing default text sizes */ body{width:100% !important; min-width:100% !important;} /* Prevent iOS Mail from adding padding to the body */ #bodyCell{padding:10px !important;} #templateContainer{ max-width:600px !important; width:100% !important; } h1{ font-size:24px !important; line-height:100% !important; } h2{ font-size:20px !important; line-height:100% !important; } h3{ font-size:18px !important; line-height:100% !important; } h4{ font-size:16px !important; line-height:100% !important; } #templatePreheader{display:none !important;} /* Hide the template preheader to save space */ #headerImage{ height:auto !important; max-width:600px !important; width:100% !important; } .headerContent{ font-size:20px !important; line-height:125% !important; } #bodyImage{ height:auto !important; max-width:560px !important; width:100% !important; } .bodyContent{ font-size:18px !important; line-height:125% !important; } .templateColumnContainer{display:block !important; width:100% !important;} .columnImage{ height:auto !important; max-width:260px !important; width:100% !important; } .leftColumnContent{ font-size:16px !important; line-height:125% !important; } .rightColumnContent{ font-size:16px !important; line-height:125% !important; } .footerContent{ font-size:14px !important; line-height:115% !important; } .footerContent a{display:block !important;} /* Place footer social and utility links on their own lines, for easier access */ } </style> Any ideas would be much appreciated. Thanks!
  21. MurderItachi

    CSS Buttons: width and height tags don't work

    Hello Guys, I'm working on a website for my aunt, due to the new privacy law, she needs to update the page with a new Button in the menu. I lost the programm which I created the old .png buttons, so I can't create the new one in the same style. I want to replace the old buttons with new ones, written in css. The only problem is the size of the buttons, they keep scaling with the writting in the button, but I want them all the same size. I attached the code of the css and html, can you help me? I know, the website is written in an old style, her former programmer did all the writting and I overtook the project a while ago. CSS.css Schwarzwaldverein Ortsgruppe Achern.html
  22. Greetings to all the users and administrators of w3scools invisionzone forum. I would love to get some constructive criticism on this web development tutorial site namely webtrickshome. It's been around for slightly more than a year but I redesigned it recently. Any feedback regarding the design and contents would be highly appreciated. Thankyou
  23. acnos

    multiplication and data base

    Hi all ! I wrote this short code : <html> <head> <style> table, th{ max-width: 600px; } .e2 { width: 200px; } </style> </head> <div style="background-color:TRANSPARENT;width:603px"> <body> <table> <tr bgcolor="TRANSPARENT" height="20"> <td class="e2" style="background-color:GREEN"></td> </tr> </table> </body> </div> </html> I have a data base column (in oracle apex), And I would like to have something like that (a multiplication) : .e2 { width = #column# * 600; } Because I would like to have a green horizontal bar chart with different size depending on the values in my database column. So, I tried calc() : did not work... And I also tried : <td style="background-color:GREEN" width=#column#*600></td> <td style="background-color:GREEN" width=calc(#column#*600)></td> Those 2 lines did not work too.. Do you have any idea how to do this multiplication please ? Best regards, acnos
  24. Sigmahokies

    Blur on video background

    Hi everyone, I'm trying to have little blur on background which is video. I added filer:blur(5px) on this video, but it won't work. Is there any way to make it work? I searched in google to see some code in, but none of them are working. Can anyone help? Thanks, Gary Taylor
  25. mysteriousmonkey29

    Interactive web comic aggregator general design?

    Hello, I am currently in the middle of creating a web comic aggregation website. So far, I have written a PHP-based RSS reader that grabs the image source links and publication dates for various web comics from their RSS feeds, and uses this to update a MySQL database. This RSS reader/database updater is configured to run once every several hours and update the database with any new comics it finds. It seems to be working fine, and now I am starting to work on the front end of the website, which needs to grab this information from the ever-growing database, and display it in a user-friendly and interactive format. I wrote the database updater in a fairly procedural way, because it didn't strike me as something that lent itself very much to object-oriented development. However, the front end of the website does strike me as something that I can save myself a lot of time on by coming up with a decent object oriented design first. Unfortunately, I don't have a lot of experience in this, so I thought I would look online for suggestions. So far, I have decided specifically what I would like the front end to do, and have come up with 2 possible approaches to designing it, but am unsure about both. Here's what I would like it to do: (To clarify, when I say the phrase "comic strip," I'm referring to a whole strip like XKCD, Dilbert, the far side, etc., and when I say the phrase "comic," it refers to an individual comic within a comic strip, i.e. the Dilbert comic for 8/30/2016). I would like my webpage, by default, to display a vertically stacked list of the latest comic images from each comic strip in the database. For customization, I want a comic strip control panel, which allows users to decide which comic strips are enabled/disabled, and in what order they are displayed. I would like each comic image to appear between text denoting the name/author of the strip and an individual set of buttons that allows the user to go forward and backward through the archived comics, and also to adjust the size/scaling of the image. Finally, I would like a similar but generalized set of buttons that allows the user to control all the comic strips in the same fashion, but at once. Based on my basic understanding of object oriented programming, and the design approach suggested in this stack overflow answer: http://stackoverflow.com/questions/1100819/how-do-you-design-object-oriented-projects, I came up with one possible design: Two classes: 1) a comic strip class that contains attributes like the comic strip's name, ID number (from my database), enabled/disabled status, and current comic to display (an object of the next class), in addition to functions to get and set each of these variables, 2) a comic class that contains attributes like the image source link, publication date, and scaling percentage, in addition to functions to get and set each of these variables Then the main webpage would contain a comic strip control panel and general comic control panel as described in the desired functionality. In addition, it would contain an array of individual comic control panels, and an array of div tags (or a similar tag), which would be displayed vertically stacked and alternating along with the comic strip names in plain text. Finally, there would be functions for updating comic and comic strip object information from the database, and functions for updating the div tag content for comic display based on the comic object information. All the functions would be called using JavaScript/Ajax from the appropriate buttons. However, I was unsure about this design, so I asked a friend, who suggested that I use a model-view-controller design pattern, which I guess is popular in web development because its potential for separating all the various languages. After reading about this online, I have come up with a possible alternative design: Model: PHP, an array of comic strips, including name and ID number, active/inactive status, and current comic image URL/publishing date View: PHP generated HTML/CSS, as described before, a comic strip control panel for enabling/disabling and ordering, a vertically stacked list of comic strip names, constituent comic images, and individual control buttons, and a general set of buttons for controlling all enabled comics at once Controller: PHP/MySQL, a function to update order and active/inactive comic strip status, a function to update a given comic strip's current comic information, and a function to update all comic strips' current comic information at once As I understand it, the controller functions would be called upon user input into the view (clicking the buttons), which would then update the information stored in the model, and then somehow that would trigger a refresh of the view based on the new model information. I am worried I may have missed something in each of these designs (especially the first one), and unsure about the potential merits of one versus another. I was also wondering if it might be possible to combine the two somehow. Does anyone have any suggestions? Help would be much appreciated
×