Jump to content

leso9903

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by leso9903

  1. Hello, I'm receiving this: "Strict Standards: Creating default object from empty value in /opt/lampp/htdocs/uppgift6/pizzeria.html on line 40" When I try to type out some attributes from an xml-document. As I've understood it I'm putting something in an empty variable(?) - how do I fix this. <?phpinclude_once("JSON.php");$json = new Services_JSON();$pizzeria = "pizzeria.xml";$writedir = "writehere";$pizzeria = $writedir."/pizzeria.xml";$sxe = simplexml_load_file($pizzeria);$result = array();foreach ($sxe->menu->pizza as $pizza->ingredient) { // $result[] = (string)$pizza->ingredient["units"]; $result[] = (string)$pizza->ingredient["id"];}echo $json->encode($result);?> XML <?xml version="1.0" encoding="utf-8"?><pizzeria> <menu> <pizza id="5"> <name>Al tonno</name> <description>A simple pie with Tunafish</description> <popularity>50</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="4" units="4" /> <ingredient id="5" units="2" /> </pizza> <pizza id="1"> <name>Margherita</name> <description>The simple vegetarian choice</description> <popularity>99</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="3" /> </pizza> <pizza id="8"> <name>Cappriciosa</name> <description>A classic pizza with ham and mushrooms</description> <popularity>450</popularity> <ingredient id="1" units="1" /> <ingredient id="2" units="2" /> <ingredient id="17" units="3" /> <ingredient id="3" units="2" /> </pizza> <pizza id="2"> <name>Al funghi</name> <description>Prepared with fresh mushrooms</description> <popularity>143</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="3" units="2" /> </pizza> <pizza id="3"> <name>Vesuvio</name> <description></description> <popularity>345</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="17" units="3" /> </pizza> <pizza id="4"> <name>Calzone</name> <description>A very popular turnover Pizza.</description> <popularity>634</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="17" units="3" /> </pizza> <pizza id="6"> <name>Opera</name> <description></description> <popularity></popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="4" units="3" /> </pizza> <pizza id="7"> <name>Orientale</name> <description></description> <popularity>345</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="14" units="3" /> <ingredient id="5" units="2" /> </pizza> <pizza id="9"> <name>Campaniola</name> <description></description> <popularity></popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="10" units="1" /> <ingredient id="6" units="2" /> <ingredient id="5" units="2" /> </pizza> <pizza id="10"> <name>Pineapple</name> <description></description> <popularity>678</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="7" units="2" /> <ingredient id="17" units="3" /> </pizza> <pizza id="11"> <name>Banana</name> <description></description> <popularity>230</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="8" units="2" /> <ingredient id="17" units="2" /> </pizza> <pizza id="12"> <name>Sultan</name> <description></description> <popularity></popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="5" units="2" /> <ingredient id="14" units="3" /> <ingredient id="12" units="1" /> </pizza> <pizza id="13"> <name>Calamata</name> <description></description> <popularity>212</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="4" units="2" /> <ingredient id="11" units="1" /> </pizza> <pizza id="14"> <name>Natali</name> <description></description> <popularity>33</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="10" units="1" /> <ingredient id="3" units="1" /> <ingredient id="6" units="1" /> </pizza> <pizza id="15"> <name>Orientale special</name> <description></description> <popularity>90</popularity> <ingredient id="1" units="3" /> <ingredient id="2" units="2" /> <ingredient id="14" units="3" /> <ingredient id="18" units="1" /> <ingredient id="5" units="2" /> </pizza> <pizza id="16"> <name>Hawaii</name> <description></description> <popularity>247</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="17" units="3" /> <ingredient id="8" units="1" /> <ingredient id="7" units="1" /> <ingredient id="9" units="1" /> </pizza> <pizza id="17"> <name>Bussola</name> <description></description> <popularity>340</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="17" units="3" /> <ingredient id="11" units="2" /> </pizza> <pizza id="18"> <name>Du chef</name> <description></description> <popularity>560</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="14" units="2" /> <ingredient id="3" units="2" /> <ingredient id="13" units="1" /> <ingredient id="5" units="2" /> </pizza> <pizza id="20"> <name>Romana</name> <description></description> <popularity>74</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="11" units="3" /> <ingredient id="3" units="2" /> </pizza> <pizza id="21"> <name>La Bella</name> <description></description> <popularity>344</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="10" units="3" /> <ingredient id="3" units="2" /> </pizza> <pizza id="31"> <name>Chicken Pizza</name> <description></description> <popularity>184</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="19" units="2" /> <ingredient id="12" units="1" /> <ingredient id="9" units="2" /> <ingredient id="5" units="1" /> <ingredient id="15" units="1" /> </pizza> <pizza id="47"> <name>Texas</name> <description>American pan pizza</description> <popularity>281</popularity> <ingredient id="1" units="3" /> <ingredient id="2" units="4" /> <ingredient id="10" units="4" /> <ingredient id="16" units="3" /> <ingredient id="15" units="1" /> </pizza> <pizza id="48"> <name>Boston</name> <description>American pan pizza</description> <popularity>281</popularity> <ingredient id="1" units="3" /> <ingredient id="2" units="4" /> <ingredient id="4" units="3" /> <ingredient id="11" units="2" /> <ingredient id="16" units="1" /> </pizza> </menu> <storage> <ingredient id="1" name="Tomato Sauce" in_storage="256" /> <ingredient id="2" name="Cheese" in_storage="25" /> <ingredient id="3" name="Mushroom" in_storage="3" /> <ingredient id="4" name="Tunafish" in_storage="6" /> <ingredient id="5" name="Onions" in_storage="29" /> <ingredient id="6" name="Olives" in_storage="29" /> <ingredient id="7" name="Pineapple" in_storage="178" /> <ingredient id="8" name="Banana" in_storage="121" /> <ingredient id="9" name="Curry" in_storage="670" /> <ingredient id="10" name="Salami" in_storage="34" /> <ingredient id="11" name="Shrimps" in_storage="93" /> <ingredient id="12" name="Fresh Tomatos" in_storage="23" /> <ingredient id="13" name="Tabasco" in_storage="17" /> <ingredient id="14" name="Minced Meat" in_storage="123" /> <ingredient id="15" name="Paprika" in_storage="17" /> <ingredient id="16" name="Gorgonzola" in_storage="17" /> <ingredient id="17" name="Ham" in_storage="54" /> <ingredient id="18" name="Eggs" in_storage="180" /> <ingredient id="19" name="Chicken" in_storage="121" /> <ingredient id="20" name="Kebab" in_storage="151" /> </storage></pizzeria>
  2. I made it work with trial and error but the manuals doesn't make sense to me. Can I tell you how I think it works, then you correct me? the following code, for example: foreach ($sxe->menu->pizza as $pizza->ingredient) { $result[] = (string)$pizza->ingredient["units"];} foreach is a loop $sxe is my root - is it possible to skip one step, for example $sxe->pizza (I skipped $menu)? I know it works in some cases but why does it work? As for the 'as' part I've no clue. $result[] is telling the engine that it is an array and will keep going until every targeted node has been processed? string is remaking the data from xml to javascript-readable data. thanks a bunch!
  3. Hello, I've been trying to print out data from an array but I dont understand the code I'm working with.. A part of the xml file is seen down below. How do I only get the description or the name for example to be printed out in my html-file? In other words, my problem is that all the data gets printed out, I only want specific data. <?xml version="1.0" encoding="utf-8"?><pizzeria> <menu> <pizza id="5"> <name>Al tonno</name> <description>A simple pie with Tunafish</description> <popularity>50</popularity> <ingredient id="1" units="2" /> <ingredient id="2" units="2" /> <ingredient id="4" units="4" /> <ingredient id="5" units="2" /> </pizza> <!DOCTYPE html><html><head><meta charset="utf-8"><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script><link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"><script type="text/javascript" src="scripts.js"></script><link rel="stylesheet" href="style.css" /><?phpinclude_once("JSON.php");$json = new Services_JSON();//$pizzeria = "pizzeria.xml";$writedir = "writehere";$pizzeria = $writedir."/pizzeria.xml";$sxe = simplexml_load_file($pizzeria);$result = array();foreach ($sxe->Children() as $pizza) { $result[] = $pizza;}echo $json->encode($result);?></head><body><h1>PIZZERIA ZORBA</h1><ul><li>Start</li><li>Order</li><li>About</li><li>TOP10</li><li>Foodstock</li><li>Recipies</li></ul></body></html>
  4. Hello, first off I wanted to thank you guys for helping me this far. I've posted a couple of times here and I got my questions answered and my problems fixed. I hope I can return the favour when I'm abit more knowledgable. Anyway, I'm working on a registration form and I've implemented some animation effects such as the input field turning red on click when there is no data inserted. I'd like to know how to keep the red input field even after the page has loaded. I've noticed that the inserted data inside the input fields are still there after I've updated the page - I'd like the same for my input field color. I've heard that it has something to do with a global variable and some false/true statements. All of this is done i jquery and I'd like to keep doing it in jquery. Also, please comment on the theory in question if there is a solution to this problem. I've a much easier time to remember stuff when there is some info about it.. thanks in advance! /Len
  5. Hello, I'd like to know if it's possible to set several conditions for an else if statement. This I know I can do: if (X==" ") {blabla} else {} But I'd like several statements like so: if (X==" " and Y==5 and Z==6) {blabla } else {} How do I do that?
  6. Thanks. solved using $("#bla:bla").val(result.name);
  7. Hello, how do I put values inside an input box onclick? I've data from JSON. For example, if I want to put data inside a div element i just do: document.getElementById("#fullname").innerHTML=result.name; How do I do the corresponding to an input-box? It doesn't work if I just put the input-box's id. Should I put .value() somewhere? The name of the JSON array is result and the objects inside the array is named ssn, name, street etc. I want to click a button (later on I'll take the value from the input box itself), look up the data inside the JSON array and fill in rest of the registration forms. HTML <form name="form" action="" method="post"> <fieldset> <legend>Name and address</legend> SSN: <input type="text" id="SSN"/><br> <button type="button" onclick="lookUp()" id="knapp">Name and adress id</button> <br> Full name: <input onkeyup="" type="text" id="fullname" name="full"><br><br> Street and number: <input type="text"><br><br> Postal code: <input type="text"><br><br> City: <input type="text"><br> </fieldset> <fieldset> <legend>Username and password</legend> Username: <input type="text"><br><br> Password: <input type="text"><br><br> <input type="checkbox" name="show" value="X">Show password<br> </fieldset> </form> function lookUp(){ var ajaxRequest; // The variable that makes Ajax possible! try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } // Create a function that will receive data sent from the server ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ document.myForm.time.value = ajaxRequest.responseText; } }$.getJSON( "ssn_lookup.php" , {ssn: "121212121212" }, function (result){ if (!result){ alert("not found"); } else { document.getElementById("myDiv").innerHTML=result.name; document.getElementById("#fullname").innerHTML=result.name; } }); }
  8. Thanks alot you guys for answering. Thing is, I'm doing this webprogramming course and the AJAX assignment is actually before the PHP tutorial..
  9. Hello I'm suppose to create a registration form that searches through a php-file and comments "entry not found" when the wrong social security is typed. I've no clue what I'm doing but atleast I got a apache server started... What should I type in my jscript file? The php-script that I'm suppose to use don't contain any data, I'm confused.. HTML <html> <head><script type="text/javascript" src="scripts.js"></script> </head> <body> <?php echo date('c'); ?> </p> <form name="form" action="" method="post"> <fieldset> <legend>Name and address</legend> <div id="myDiv"></div> SSN: <input type="text" id="SSN" onkeyup="lookUp()"/><br> <div id="underInput" /><br> Full name: <input onkeyup="showHint2(this.value)" type="text" id="fullname" name="full"><br> <div id="txtHint2"></div> Street and number: <input type="text"><br> Postal code: <input type="text"><br> City: <input type="text"> </fieldset> <fieldset> <legend>Username and password</legend> Username: <input type="text"><br> Password: <input type="text"><br> <input type="checkbox" name="show" value="X">Show password<br> </fieldset> </form><h3>Start typing a name in the input field below:</h3><form action=""> First name: <input type="text" id="txt1" onkeyup="showHint(this.value)" /></form><p>Suggestions: <span id="txtHint"></span></p> </body></html> JSCRIPT function lookUp(){ $.getJSON( "ssn_lookup.php" , //The URL to perform the lookup {ssn: "121212121212" }, //The data you send function (result){ //The function to fire upon return if (!result){ //result is JSON formatted (Execute if SSN does not exist) } else { (Execute if SSN exists) } });} Server PHP file <?php// FILE: ssn_lookup.php//// LAST MODIFIED: 2006-03-23//// AUTHOR: Troy Wolf <troy@troywolf.com>//// DESCRIPTION: Allow scripts to request content they otherwise may not be// able to. For example, AJAX (XmlHttpRequest) requests from a// client script are only allowed to make requests to the same// host that the script is served from. This is to prevent// "cross-domain" scripting. With proxy.php, the javascript// client can pass the requested URL in and get back the// response from the external server.//// USAGE: "proxy_url" required parameter. For example:// http://www.mydomain.com/proxy.php?proxy_url=http://www.yahoo.com//// proxy.php requires Troy's class_http. http://www.troywolf.com/articles// Alter the path according to your environment.require_once("class_http.php");/* $proxy_url = isset($_GET['proxy_url'])?$_GET['proxy_url']:false; if (!$proxy_url) { header("HTTP/1.0 400 Bad Request"); echo "proxy.php failed because proxy_url parameter is missing"; exit(); } */$proxy_url = "http://www.it.uu.se/edu/course/homepage/websiteconst/st13/assignments/4/scripts/ssn_lookup";// Instantiate the http object used to make the web requests.// More info about this object at www.troywolf.com/articlesif (!$h = new http()) { header("HTTP/1.0 501 Script Error"); echo "proxy.php failed trying to initialize the http object"; exit();}$h->url = $proxy_url;$h->postvars = $_REQUEST; //$_POSTif (!$h->fetch($h->url)) { header("HTTP/1.0 501 Script Error"); echo "proxy.php had an error attempting to query the url"; exit();}// Forward the headers to the client.$ary_headers = explode("n", $h->header);foreach ($ary_headers as $hdr) { header($hdr);}// Send the response body to the client.echo $h->body;?>
  10. Hi, I followed a tutorial on and I wrote exactly as he did but it still doesn't work. i also want to know where I can find a tutorial that you went through to create a registration form which includes social security number, name, adress and so on, as well as password visibility, username taken etc<!DOCTYPE><html><head> <script src="movies.js"></script></head><body onload="createList()"> Here are my favorite movies: <br/> <div id="divMovies"></div></body></html> JS function createList(){ var s; s = "<ul>" + <"li>Armageddon</li>" + <"li>fefwfe</li>" + <"li>wfewfew</li>" + "<ul>"; divMovies = document.getElementById("divMovies"); divMovies.innerHTML = s;} I'm very confused! thanks in advance.
  11. It works! thank you very very much. I've a followup question. say I want to have an animation that changes the opacity from 0 to 1 and vice versa. How would I go about doing that? I've changed the code a bit but it's basically what I got from you.. function mainmenu(){$(" #nav ul ").css({display: "none"}); // Opera Fix$(" #nav li").hover(function(){ $(this).children('ul').stop(true,true).slideDown("linear"); },function(){ $(this).children('ul').stop(true,true).slideUp("linear"); });} $(document).ready(function(){ mainmenu(); }) I changed slideUp/slideDown to opacity 1/0: function mainmenu(){$(" #nav ul ").css({display: "none"}); // Opera Fix$(" #nav li").hover(function(){ $(this).children('ul').stop(true,true).animate({"opacity": 1}); },function(){ $(this).children('ul').stop(true,true).animate({"opacity": 0}); });} $(document).ready(function(){ mainmenu();}) But it doesn't work, did I miss something?
  12. Now, that's the code I'm looking for, however, it doesn't work for me..I think the target doesn't work or something?
  13. Hello, I've tried to do a Jquery dropdown on a menu but it only works one time. Is there any kind of toggle or something I should use instead. Do you have any soutions to a multilevel dropdown submenu? I'm very new to Jquery.. <ul> <li><a href="#">BlA</a></li> <li><a href="#">HTML</a></li> <li class="css"><a href="#">CSS</a> <ul class="subcss"> <li><a href="#">Box Model</a></li> <li><a href="#">Pseudo Classes</a></li> </ul></li> <!-- </li> sätts efter sub-menyerna --> <li><a href="#">JavaScript</a></li> </ul> $(function(){ $('.css').mouseover(function(){ $('ul>li').slideDown(); }).mouseleave(function(){ $('.subcss').slideUp(); });});
  14. Hi, I just started doing some javascript with jquery and I can't seem to make the code work.. I don't think javascript is "on" sort of speak. What have I done wrong? The tutorial is here: http://blog.themeforest.net/screencasts/jquery-for-absolute-beginners-video-series/ <!DOCTYPE html><html><head><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" type="text/javascript"></script><link rel="stylesheet" href="html.css" type="text/css"></head><body><div id="box"></div><a href="#"> click me! </a></body></html> $(function)() {$('a').click(function() { $('#box').fadeOut();});}); #box {background:red;width:300px;height:300px;}
  15. I tried #picture { position:relative; float: right; right: 20px; bottom: 160px;} but I'm not sure if that was a good solution.. I had to figure out the size of the picture and then place it accordingly..
  16. Hello! I've a picture which I want to place on the bottom right of a header background. I'm not sure what to do, any suggestions? This is my header. Then I want a picture to be placed in the bottom right of that header. #header {background-color:green;height: 200px;margin:0px 20px 0px 20px;/*top right bottom left*/} /Len
  17. I have another CSS file that I didn't link (it doesn't work anymore).. The text color do change without this CSS file, but so does almost very other attribute from the site. Something in style-weaver.css overwrites style.css. That is, something overwrites the text color on Hello world.. style-weaver.css /* WARNING: Do not edit this file. It is dynamically generated. Any edits you make will be overwritten. *//* This file generated using Weaver V2.0 subtheme: Wheat *//* General Options */#main {padding: 15px 0 0 0;}#access, #access li ul ul > a {font-weight:bold;}#access2, #access2 li ul ul > a {font-weight:bold;}body, input, textarea, .page-title span, .pingback a.url {font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;}body {background-image: url(http://localhost/wp/wp-content/themes/weaver/images/gr.png); background-attachment: scroll; background-repeat: repeat-x;}#access, #access2 { background-image: url(http://localhost/wp/wp-content/themes/weaver/images/weaver/fade.png);}#access ul ul a, #access li:hover > a, #access ul ul :hover > a { background-image: url(http://localhost/wp/wp-content/themes/weaver/images/weaver/fadeup.png);}#access2 ul ul a, #access2 li:hover > a, #access2 ul ul :hover > a { background-image: url(http://localhost/wp/wp-content/themes/weaver/images/weaver/fadeup.png);}#site-description {font-size:130%; font-weight:bold;}#content {font-size: 120%; line-height: 125%; }#comments {font-size: 90%; line-height: 90%; }#wrapper {border: 1px solid #222222; padding-right: 20px; margin-top: 15px; margin-bottom: 15px;}#header {margin-top: 0px;}#primary, #secondary, #altleft, #altright, #altleft, #altright {border: 1px solid #222222;}#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {border: 1px solid #222222;}#container, #primary, #secondary, #altleft, #altright, #ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {-moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px;}#access {-moz-border-radius-bottomleft: 7px; -moz-border-radius-bottomright: 7px;-webkit-border-bottom-left-radius: 7px; -webkit-border-bottom-right-radius: 7px;border-bottom-left-radius: 7px; border-bottom-right-radius: 7px;}#access2 {-moz-border-radius-topleft: 7px; -moz-border-radius-topright: 7px;-webkit-border-top-left-radius: 7px; -webkit-border-top-right-radius: 7px;border-top-left-radius: 7px; border-top-right-radius: 7px;}#wrapper {-moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; margin-top: 15px; margin-bottom: 15px;}#access a, #access2 a { padding-left:10px; padding-right:10px;}/* Sidebar arrangement *//* Color and custom CSS */#site-title {position: absolute; margin-left: 40px; margin-top: 44px;}#site-description { width:50%; text-align:left; clear: both; float: left; position:absolute; margin-left: 40px; margin-top: 90px; }body {background-color: #C7B491;}#container {background-color: transparent;}#content {background-color: transparent;}#content, #content input, #content textarea {color: #292929;}#site-description {color: #FFFAEF;}#footer {background-color: #F5DEB3;}#colophon { border-top: 4px solid #AB9B7D ; }#first,#second, #third, #fourth {background-color: transparent;padding-left: 10px; padding-top: 10px; margin-bottom: 5px;}#header {background-color: transparent;}.entry-title {border-bottom: 1px solid #0A0A0A;}hr {background-color: #AB9B7D;}.page-title a:link {color: #474134;}.entry-meta a:link {color: #474134;}.entry-utility a:link {color: #474134;}.navigation a:link {color: #474134;}.comment-meta a:link {color: #474134;}.reply a:link, a.comment-edit-link:link {color: #474134;}.page-title a:active, .page-title a:hover {color: #C91640;}.entry-meta a:hover, .entry-meta a:active {color: #C91640;}.entry-utility a:hover, .entry-utility a:active {color: #C91640;}.navigation a:active, .navigation a:hover {color: #C91640;}.comment-meta a:active, .comment-meta a:hover {color: #C91640;}.reply a:active, a.comment-edit-link:active, .reply a:hover, a.comment-edit-link:hover {color: #C91640;}.page-title a:visited {color: #706752;}.entry-meta a:visited {color: #706752;}.entry-utility a:visited {color: #706752;}.navigation a:visited {color: #706752;}.comment-meta a:visited {color: #706752;}.reply a:visited, a.comment-edit-link:visited {color: #706752;}#comments .pingback p {color: #706752;}#respond label, #respond dt, #respond dd {color: #706752;}.entry-meta, .entry-content label, .entry-utility {color: #706752;}#content .wp-caption, #content .gallery .gallery-caption {color: #706752;}.navigation {color: #706752;}.entry-meta {background-color: transparent;}.entry-utility {background-color: transparent;}input[type="text"], textarea, input[type="submit"], ins {background-color: #F0F0F0;}a:link {color: #474134;}a:active, a:hover {color: #C91640;}a:visited {color: #706752;}#main {background-color: transparent;}#content .wp-caption p.wp-caption-text, #content .gallery .gallery-caption {color: #333333;}#content .size-full, #content .size-large, #content .size-medium, #content .size-thumbnail,#content .size-thumbnail {background-color: transparent;}#content .wp-caption p.wp-caption-text,#content .wp-caption .size-full, #content .wp-caption .size-large, #content .wp-caption .size-medium,#content .wp-caption .size-thumbnail, #content .wp-caption .size-thumbnail {background-color: #F1F1F1;}#access, #access2 {background-color: #AB9B7D;}#access ul li.current_page_item > a, #access ul li.current-menu-ancestor > a,#access ul li.current-menu-item > a, #access ul li.current-menu-parent > a {color: #474134;}#access2 ul li.current_page_item > a, #access2 ul li.current-menu-ancestor > a,#access2 ul li.current-menu-item > a, #access ul li.current-menu-parent > a {color: #474134;}#access li:hover > a, #access ul ul :hover > a {color: #F0EBE0;}#access2 li:hover > a, #access2 ul ul :hover > a {color: #F0EBE0;}#access ul ul a, #access li:hover > a, #access ul ul :hover > a {background-color: #BAA987;}#access2 ul ul a, #access2 li:hover > a, #access2 ul ul :hover > a {background-color: #BAA987;}#access a {color: #FFFAEF;}#access2 a {color: #FFFAEF;}#wrapper {background-color: #FEF3DD;}.entry-title a:link {color: #0A0A0A;}.widget_rss a.rsswidget:link {color: #0A0A0A;}.entry-title a:active, .entry-title a:hover {color: #C91640;}.widget_rss a.rsswidget:active, .widget_rss a.rsswidget:hover {color: #C91640;}.entry-title a:visited {color: #0A0A0A;}.widget_rss a.rsswidget:visited {color: #0A0A0A;}.post {background-color: transparent;}#primary {background-color: #F5DEB3;padding-left: 10px; padding-top: 10px; margin-bottom: 5px;}#secondary {background-color: #F5DEB3;padding-left: 10px; padding-top: 10px; margin-bottom: 5px;}#altright, #altleft {background-color: #F5DEB3;padding-left: 10px; padding-top: 10px; margin-bottom: 5px;}.home .sticky, #entry-author-info, #container.page-with-posts .sticky {background-color: #E6DCC8;}#content h1, #content h2, #content h3, #content h4, #content h5, #content h6, #content dt, #content th {color: #0A0A0A;}h1, h2, h3, h4, h5, h6 {color: #0A0A0A;}.page-title {color: #0A0A0A;}.page-link {color: #0A0A0A;}#entry-author-info h2 {color: #0A0A0A;}h3#comments-title, h3#reply-title {color: #0A0A0A;}.comment-author cite {color: #0A0A0A;}.entry-content fieldset legend {color: #0A0A0A;}#content .entry-title {color: #0A0A0A;}#site-title a { color: #FEF9EE; }#ttw-top-widget, #ttw-bot-widget, #ttw-site-top-widget, #ttw-site-bot-widget, #per-page-widget {background-color: #F5DEB3;padding-left: 10px; padding-top: 10px; margin-bottom: 10px;}table { border-collapse:collapse;border-spacing:0;}th { text-align:left; padding:4px 4px; }td { margin:0;padding:4px 4px; }#content table { border: 2px solid #AAA; text-align: left; margin: auto; margin-bottom: 5px; width: auto; }#content tr th, #content thead th { color: inherit; background-color: rgba(0,0,0,.1); font-size: medium; font-weight: normal; line-height: normal; padding: 5px 10px; }#content tr td { border: 1px solid #AAA; padding: 5px 10px; }#content tr.odd td { background: inherit; }.widget-area {color: #333333;}.widget-title {border-bottom: 1px solid #222222; margin-bottom:5px;}.widget-container {background-color: transparent;}.widget-title {color: #222222;}.widget_search label {color: #222222;}#wp-calendar caption {color: #222222;}#primary a:link, #secondary a:link, #altleft a:link, #altright a:link, #footer-widget-area a:link {color: #474134;}#primary a:hover, #secondary a:hover, #altleft a:hover, #altright a:hover, #footer-widget-area a:hover {color: #C91640;}#primary a:visited, #secondary a:visited, #altleft a:visited, #altright a:visited, #footer-widget-area a:visited {color: #706752;}#wrapper {box-shadow: 0 0 3px 3px rgba(0,0,0,0.25); -webkit-box-shadow: 0 0 3px 3px rgba(0,0,0,0.25); -moz-box-shadow: 0 0 3px 3px rgba(0,0,0,0.25);}/* end Weaver CSS */
  18. I'm not sure what to make of this mumbo jumbo, but when I named and then renamed a CSS file it worked.
  19. Hmm, I changed #content .entry-title { color:red; font-size: 21px; font-weight: bold; line-height: 1.3em; margin-bottom: 0;}.entry-title a:link,.entry-title a:visited { color:red; text-decoration: none;}.entry-title a:active,.entry-title a:hover { color:red;} but nothing seems to change.. I was thinking it might do with the CSS file names (because I replaced them with a CSS file from another site) but I did change the CSS names to the original name. The CSS files is in a map called css and the file names are style.css and style-weaver.css
  20. Hi!I've received an assignment from class in which I'm to use CSS from one website and use it on another, then I'm to change some attributes and stuff. I'm to change the color of "Hello world" and it doesn't seem to work. I found the class and ID, namely:#content .entry-title { color: red; font-size: 21px; font-weight: bold; line-height: 1.3em; margin-bottom: 0;} but it doesn't seem to work. I know it's not suppose to be overwritten because it's got a high specificity, both id and class. Any thoughts on this? Have I missed something? HTML <!DOCTYPE html><html dir="ltr" lang="en-US"> <head> <meta charset="UTF-8" /> <title>Website Construction | demonstrate the importance of structure</title> <link rel="stylesheet" type="text/css" media="all" href="css/style.css" /> <link rel='stylesheet' id='weaver-style-sheet-css' href='css/style-weaver.css' type='text/css' media='all' /> <script src="js/jquery-1.6.1.min.js"></script> <script src="js/info.js"></script> </head> <body class="home blog"> <div id="wrapper" class="hfeed"> <div id="info"> <div class="tip"> <p>In order to pass this part of the lab you need to complete the following steps on the basic site keeping the good file structure.</p> <ul> <li>Restyle the pages using the css files the nice solution uses</li> <li>Switch the information icon to the round one used in the nice solution</li> <li>Switch the banner image on the main page to the dynamic image used in the nice page</li> <li>Switch the weather icon to the round one, also change the link to point at "weather.yahoo.com"</li> <li>Make the heading of the "Hello world" post red since it is very important</li> <li>Add a link to "www.wimbledon.com" on the 20th of June in the calendar</li> <li>Use the javascript file used in the nice solution</li> <li>Make google host jquery for you using the link <code>"http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"</code></li> <li>Renaming the main directory your solution resides in or moving it into a different directory should not break the page</li> </ul> </div> </div> <div id="header"> <div id="masthead"> <div id="ttw-site-logo"></div> <div id="ttw-site-logo-link" onclick="location.href='.'" style="cursor:pointer;"></div> <h1 id="site-title"> <span> <a href="." title="Website Construction" >Website Construction</a> </span> </h1> <div id="nav-top-menu"><div id="access2" role="navigation"> </div></div><!-- #access2 --> <div id="branding" role="banner"> <img src="img/wheat.jpg" width="940" height="198" alt="" /> </div><!-- #branding --> <div id="nav-bottom-menu"><div id="access" role="navigation"> <div class="menu"><ul><li class="current_page_item"><a href="." title="Home">Home</a></li><li class="page_item page-item-2"><a href="sample.html" title="Sample Page">Sample Page</a></li></ul></div> </div></div><!-- #access --> </div><!-- #masthead --> </div><!-- #header --> <div id="main"> <div id="container" class="container-index-loop"> <div id="content" role="main"> <div id="post-1" class="post-1 post type-post status-publish format-standard hentry category-uncategorized"> <h2 class="entry-title"><a href="." title="Permalink to Hello world!" rel="bookmark">Hello world!</a></h2> <div class="entry-content"> <p>A variation of one of the most famous and meaningless exercises used in computer science.</p> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor ###### soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. </p> <div class="clear-cols"></div> </div> </div><!-- #post-## --> <a href="http://www.weather.com"><img class="weather" alt="weather" src="img/weatherblack.jpg"></a> <span>To check the weather click the icon.</span> </div><!-- #content --> </div><!-- #container --> <div id="primary" class="widget-area" role="complementary"> <ul class="xoxo"> <li id="calendar-3" class="widget-container widget_calendar"><h3 class="widget-title"> </h3><div id="calendar_wrap"><table id="wp-calendar"> <caption>June 2011</caption> <thead> <tr> <th scope="col" title="Monday">M</th> <th scope="col" title="Tuesday">T</th> <th scope="col" title="Wednesday">W</th> <th scope="col" title="Thursday">T</th> <th scope="col" title="Friday">F</th> <th scope="col" title="Saturday">S</th> <th scope="col" title="Sunday">S</th> </tr> </thead> <tfoot> <tr> <td colspan="3" id="prev" class="pad"> </td> <td class="pad"> </td> <td colspan="3" id="next" class="pad"> </td> </tr> </tfoot> <tbody> <tr> <td colspan="2" class="pad"> </td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td> </tr> <tr> <td><a href="http://www.nationaldagen.se/" title="Sveriges nationaldag">6</a></td><td>7</td><td>8</td><td id="today">9</td><td>10</td><td>11</td><td>12</td> </tr> <tr> <td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td><td>19</td> </tr> <tr> <td>20</td><td>21</td><td>22</td><td>23</td><td>24</td><td>25</td><td>26</td> </tr> <tr> <td>27</td><td>28</td><td>29</td><td>30</td> <td class="pad" colspan="3"> </td> </tr> </tbody> </table></div></li> </ul> </div><!-- #primary .widget-area --> </div><!-- #main --> <div id="footer"> <div id="colophon"> <table id='ttw_ftable'><tr> <td id='ttw_ftdl'><div id="site-info"> © 2011 - <a href="." title="Website Construction" >Website Construction</a> </div></td> <td id='ttw_ftdr'></td> </tr></table> </div><!-- #colophon --> </div><!-- #footer --> </div><!-- #wrapper --> </body></html> CSS /* =Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html-------------------------------------------------------------- */html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td { background: transparent; border: 0; margin: 0; padding: 0; vertical-align: baseline;} body { line-height: 1;}h1, h2, h3, h4, h5, h6 { clear: both; font-weight: normal;}ol, ul { list-style: none;}blockquote { quotes: none;}blockquote:before, blockquote:after { content: ''; content: none;}del { text-decoration: line-through;}a img { border: none;}img.weather{ width: 60px; height: 60px;}/* =Weaver helpers-------------------------------------------------------------- */.aligncenter { /* required for theme submission to WP */ display: block; margin-left: auto; margin-right: auto;}.alignleft { float: left;}.alignright { float: right;}.ttw-center { /* generic utility center class - use in Heading Insert Code area maybe */ clear: both; display:block; margin-left:auto; margin-right:auto;}.wvr-show-posts { overflow: hidden;}.wvr-show-posts .hentry { margin-bottom: 24px;}.widget-area .wvr-show-posts .hentry { margin-bottom: 0px;}.widget-area .wvr-show-posts .entry-title { font-size:115%;font-weight:bold;margin-bottom:0px;}.widget-area .wvr-show-posts .attachment-thumbnail { float: left; margin-right: 2px; margin-bottom: 0px; padding: 2px;}#header .meteor-slides {clear:both;}.wp-pagenavi { padding-top:3px; padding-bottom:8px; }/* =superfish helpers-------------------------------------------------------------- */.sf-menu a.sf-with-ul { padding-right: 2.25em; min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */}.sf-sub-indicator { position: absolute; display: block; right: 10px; top: 1.05em; /* IE6 only */ margin-top: 5px; width: 10px; height: 10px; text-indent: -999em; overflow: hidden; background: url(js/superfish/images/arrows-ffffff.png) no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */}a > .sf-sub-indicator { /* give all except IE6 the correct values */ top: .7em; background-position: 0 -100px; /* use translucent arrow for modern browsers*/}/* apply hovers to modern browsers */a:focus > .sf-sub-indicator,a:hover > .sf-sub-indicator,a:active > .sf-sub-indicator,li:hover > a > .sf-sub-indicator,li.sfHover > a > .sf-sub-indicator { background-position: -10px -100px; /* arrow hovers for modern browsers*/}/* point right for anchors in subs */.sf-menu ul .sf-sub-indicator { background-position: -10px 0; }.sf-menu ul a > .sf-sub-indicator { background-position: 0 0; }/* apply hovers to modern browsers */.sf-menu ul a:focus > .sf-sub-indicator,.sf-menu ul a:hover > .sf-sub-indicator,.sf-menu ul a:active > .sf-sub-indicator,.sf-menu ul li:hover > a > .sf-sub-indicator,.sf-menu ul li.sfHover > a > .sf-sub-indicator { background-position: -10px 0; /* arrow hovers for modern browsers*/}/*** shadows for all but IE6 ***/.sf-shadow ul { background: url(js/superfish/images/shadow.png) no-repeat bottom right; padding: 0 3px 3px 0; -moz-border-radius-bottomright: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -webkit-border-bottom-right-radius: 4px; display:none;}.sf-shadow ul.sf-shadow-off { background: transparent;}.sf-menu a { padding: 5px 8px;}/* =Layout-------------------------------------------------------------- *//*LAYOUT: Two columnsDESCRIPTION: Two-column fixed layout with one sidebar right of content*/#container { float: left; margin: 0 -240px 4px 0; width: 100%;}#content { /* IMPORTANT! need this to make the content bg color work right */ padding-left: 45px; padding-right: 15px; margin: 0 280px 0 -20px; width: 670px;}#primary,#secondary { float: right; overflow: hidden; width: 220px;}#secondary { clear: right;}#footer { clear: both; width: 100%;}/*LAYOUT: One column, no sidebarDESCRIPTION: One centered column with no sidebar*/.one-column #content { margin: 0 auto; width: 840px;}.one-column #content img { max-width: 820px;}.one-column #content .page { padding-right:40px;}.one-column #content .post { padding-right:40px;} /* one column iframe */#container.one-column-iframe { width:100%;}#container.one-column-iframe #content .entry-content { padding:12px 0px 0px 0px;width:100%}#container.one-column-iframe #content { margin:0px;padding:0px;width:100%;}#container.one-column-iframe #content #comments { padding:0px 20px 5px 20px;margin-top:-35px;}/* =Fonts-------------------------------------------------------------- */body,input,textarea,.page-title span,.pingback a.url { font-family: Georgia, "Bitstream Charter", serif;}h3#comments-title,h3#reply-title,#access .menu,#access div.menu ul,#access2 .menu,#access2 div.menu ul,#cancel-comment-reply-link,.form-allowed-tags,#site-info,#site-title,#wp-calendar,.comment-meta,.comment-body tr th,.comment-body thead th,.entry-content label,.entry-content tr th,.entry-content thead th,.entry-meta,.entry-title,.entry-utility,#respond label,.navigation,.page-title,.pingback p,.reply,.widget-title,.wp-caption-text,input[type=submit] { font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;}pre { font-family: "Courier 10 Pitch", Courier, monospace;}code { font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;} /* =Structure-------------------------------------------------------------- *//* The main theme structure */#access .menu-header,#access2 .menu-header,div.menu,#colophon,#branding,#main,#wrapper { margin: 0 auto; width: 940px;}#wrapper { background: #fff; margin-top: 20px; padding: 0 20px;}/* Structure the footer area */#footer-widget-area { overflow: hidden;}#footer-widget-area .widget-area { float: left; margin-left: 4px; width: 215px; padding-right:5px;}#site-info { float: left; font-size: 14px; font-weight: bold; width: 700px;}#site-generator { float: right; width: 220px;} /* =Global Elements-------------------------------------------------------------- *//* Main global 'theme' and typographic styles */body { background: #f1f1f1;}body,input,textarea { color: #666; font-size: 12px; line-height: 18px;}hr { background-color: #e7e7e7; border: 0; clear: both; height: 1px; margin-bottom: 18px;}/* Text elements */p { margin-bottom: 18px;}ul { list-style: square; margin: 0 0 18px 1.5em;}ol { list-style: decimal; margin: 0 0 18px 1.5em;}ol ol { list-style: upper-alpha;}ol ol ol { list-style: lower-roman;}ol ol ol ol { list-style: lower-alpha;}ul ul,ol ol,ul ol,ol ul { margin-bottom: 0;}dl { margin: 0 0 24px 0;}dt { font-weight: bold;}dd { margin-bottom: 18px;}strong { font-weight: bold;}cite,em,i { font-style: italic;}big { font-size: 131.25%;}ins { background: #ffc; text-decoration: none;}blockquote { font-style: italic; padding: 0 3em;}blockquote cite,blockquote em,blockquote i { font-style: normal;}pre { background: #f7f7f7; color: #222; line-height: 18px; margin-bottom: 18px; padding: 1.5em;}abbr,acronym { border-bottom: 1px dotted #666; cursor: help;}sup,sub { height: 0; line-height: 1; position: relative; vertical-align: baseline;}sup { bottom: 1ex;}sub { top: .5ex;}input[type="text"],textarea { background: #f9f9f9; border: 1px solid #ccc; box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1); -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1); -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1); padding: 2px;}a:link { color: #0066cc;}a:visited { color: #743399;}a:active,a:hover { color: #ff4b33;}/* Text meant only for screen readers */.screen-reader-text { position: absolute; left: -9000px;} /* =Header-------------------------------------------------------------- */#header { padding: 30px 0 0 0;}#site-title { float: left; font-size: 30px; line-height: 36px; margin: 0 0 18px 0; width: 700px;}#site-title a { color: #000; font-weight: bold; text-decoration: none;}#site-description { clear: right; float: right; font-style: italic; margin: 14px 0 18px 0; width: 220px;}#info { position: relative; top:5px; left:930px; height: 24px; width: 24px; background-repeat: no-repeat; background-image:url('iconwheat24.jpeg');}div#info div.tip{ display:none; width: 300px; position: relative; right: 286px; padding: 5px; z-index:500; background: white; border:solid grey 1px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;}/* This is the custom header image */#branding { margin-top: -10px;} /* ability to hide things required this one */#branding img { clear: both; display: block; margin-left: auto; margin-right: auto; margin-top: 4px; margin-bottom: 0;}/* =Menu-------------------------------------------------------------- */.menu-add-left { float:left; display:inline; padding-left:4px; overflow:hidden; max-height: 38px;}.menu-add { float:right; display:inline; padding-right:4px; overflow:hidden; max-height: 38px;}.menu-add-left form,.menu-add-left form div,.menu-add-left a,.menu-add form,.menu-add form div,.menu-add a { display:inline !important;}.menu-add img { position:relative; top:2px; max-height:24px !important; border:none;margin:0; padding-left:4px;}.menu-add-left img { position:relative; top:2px; max-height:24px !important; border:none;margin:0; padding-right:4px;}#nav-top-menu { /* needed for IE 7 */ position:relative; z-index:6;}#nav-bottom-menu { position:relative; z-index: 5;}#access,#access2 { background: #000; display: block; float: left; margin: 0 auto; width: 940px;}#access .menu-header,#access2 .menu-header,div.menu { font-size: 13px; margin-left: 12px; width: 928px;}#access .menu-header ul,#access2 .menu-header ul,div.menu ul { list-style: none; margin: 0;}#access .menu-header li,#access2 .menu-header li,div.menu li { float: left; position: relative;}#access a,#access2 a { color: #aaa; display: block; line-height: 38px; padding-bottom: 0; padding-top: 0; /* have to add in left/right if NOT sf-menu in generatecss */ text-decoration: none;}#access ul ul,#access2 ul ul { box-shadow: 0px 3px 3px rgba(0,0,0,0.2); -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2); -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2); display: none; position: absolute; top: 38px; left: 0; float: left; width: 180px; z-index: 99999;}#access ul ul li,#access2 ul ul li { min-width: 180px;}#access ul ul ul,#access2 ul ul ul { left: 100%; top: 0;}#access ul ul a,#access2 ul ul a { background: #333; line-height: 1em; padding: 10px; width: 160px; height: auto;}#access li:hover > a,#access ul ul :hover > a,#access2 li:hover > a,#access2 ul ul :hover > a { background: #333; color: #fff;}#access ul li:hover > ul,#access2 ul li:hover > ul { display: block;} #access ul li.current_page_item > a,#access ul li.current-menu-ancestor > a,#access ul li.current-menu-item > a,#access ul li.current-menu-parent > a,#access2 ul li.current_page_item > a,#access2 ul li.current-menu-ancestor > a,#access2 ul li.current-menu-item > a,#access2 ul li.current-menu-parent > a { color: #fff;}* html #access ul li.current_page_item a,* html #access ul li.current-menu-ancestor a,* html #access ul li.current-menu-item a,* html #access ul li.current-menu-parent a,* html #access ul li a:hover,* html #access2 ul li.current_page_item a,* html #access2 ul li.current-menu-ancestor a,* html #access2 ul li.current-menu-item a,* html #access2 ul li.current-menu-parent a,* html #access2 ul li a:hover { color: #fff;}/* =Content-------------------------------------------------------------- */#main { clear: both; overflow: hidden; padding: 40px 0 0 0;}#content { margin-bottom: 36px;}#content,#content input,#content textarea { color: #333; font-size: 16px; line-height: 24px;}#content p,#content ul,#content ol,#content dd,#content pre,#content hr { margin-bottom: 24px;}#content ul ul,#content ol ol,#content ul ol,#content ol ul { margin-bottom: 0;}#content pre,#content kbd,#content tt,#content var { font-size: 15px; line-height: 21px;}#content code { font-size: 13px;}#content dt,#content th { color: #000;}#content h1,#content h2,#content h3,#content h4,#content h5,#content h6 { color: #000; line-height: 1.5em; margin: 0 0 20px 0;} .hentry { margin: 0 0 40px 0;}.home .sticky,#container.page-with-posts .sticky { background-color: #888; border-top: 2px dotted #444; border-bottom: 2px dotted #444; margin-right:4px; margin-left:1px; padding: 18px 20px;}.single .hentry { margin: 0 0 36px 0;}.page-title { color: #000; font-size: 14px; font-weight: bold; margin: 0 0 36px 0;}.page-title span { font-size: 16px; font-style: italic; font-weight: normal;}.page-title a:link,.page-title a:visited { color: #888; text-decoration: none;}.page-title a:active,.page-title a:hover { color: #ff4b33;}#content .entry-title { color: red; font-size: 21px; font-weight: bold; line-height: 1.3em; margin-bottom: 0;} .entry-title a:link,.entry-title a:visited { color: #000; text-decoration: none;}.entry-title a:active,.entry-title a:hover { color: #ff4b33;}.entry-meta { color: #888; font-size: 12px;}.entry-meta abbr,.entry-utility abbr { border: none;}.entry-meta abbr:hover,.entry-utility abbr:hover { border-bottom: 1px dotted #666;}.entry-content,.entry-summary { clear: both; padding: 12px 0 0 0;}#content .entry-summary p:last-child { margin-bottom: 12px;}.entry-content fieldset { border: 1px solid #e7e7e7; margin: 0 0 24px 0; padding: 24px;}.entry-content fieldset legend { background: #fff; color: #000; font-weight: bold; padding: 0 24px;}.entry-content input { margin: 0 0 24px 0;}.entry-content input.file,.entry-content input.button { margin-right: 24px;}.entry-content label { color: #888; font-size: 12px;}.entry-content select { margin: 0 0 24px 0;}.entry-content sup,.entry-content sub { font-size: 10px;}.entry-content blockquote.left { float: left; margin-left: 0; margin-right: 24px; text-align: right; width: 33%;}.entry-content blockquote.right { float: right; margin-left: 24px; margin-right: 0; text-align: left; width: 33%;}.page-link { color: #000; font-weight: bold; margin: 0 0 22px 0; word-spacing: 0.5em; clear:both;}.page-link a:link,.page-link a:visited { background: #f1f1f1; color: #333; font-weight: normal; padding: 0.5em 0.75em; text-decoration: none;}.home .sticky .page-link a { background: #a8a8a8;}.page-link a:active,.page-link a:hover { color: #ff4b33;}body.page .edit-link{ clear: both;}#content .attachment-thumbnail { float: left; margin-right: 12px; margin-bottom: 12px; padding: 3px;}#content .attachment-thumbnail-single { float: left; margin-right: 25px; margin-bottom: 12px; padding: 3px;}#entry-author-info { background-color: #888; border-top: 2px dotted #444; border-bottom: 2px dotted #444; margin: 0 4px 5px 1px; padding: 18px 20px; clear: both; overflow: hidden; font-size: 12px;}#entry-author-info #author-avatar { background: #fff; border: 1px solid #888; float: left; height: 60px; margin: 0 -100px 0 0; padding: 3px;}#entry-author-info #author-description { float: left; margin: 0 0 0 104px;}#entry-author-info h2 { color: #000; font-size: 100%; font-weight: bold; margin-bottom: 0;}.entry-utility { clear: both; color: #888; font-size: 12px; line-height: 18px;}.entry-meta a,.entry-utility a { color: #888;}.entry-meta a:hover,.entry-utility a:hover { color: #ff4b33;}#content .video-player { padding: 0;}#wvr-sitemap h3 { line-height: 2em; margin: 0 0 10px 0; font-size:130%; font-weight:bold;}/* =Asides-------------------------------------------------------------- */.home #content .category-asides p { font-size: 14px; line-height: 20px; margin-bottom: 10px; margin-top: 0;}.home .hentry.category-asides { padding: 0;}.home #content .category-asides .entry-content { padding-top: 0;} /* =Gallery listing-------------------------------------------------------------- */.category-gallery .size-thumbnail img { border: 10px solid #f1f1f1; margin-bottom: 0;}.category-gallery .gallery-thumb { float: left; margin-right: 20px; margin-top: -4px;}.home #content .category-gallery .entry-utility { padding-top: 4px;} /* =Attachment pages-------------------------------------------------------------- */.attachment .entry-content .entry-caption { font-size: 140%; margin-top: 24px;}.attachment .entry-content .nav-previous a:before { content: '\2190\00a0';}.attachment .entry-content .nav-next a:after { content: '\00a0\2192';} /* =Images-------------------------------------------------------------- */#content img { margin: 0; height: auto; max-width: 640px;}#content .attachment img { max-width: 900px;}#content .alignleft,#content img.alignleft { display: inline; float: left; margin-right: 24px; margin-top: 4px;}#content .alignright,#content img.alignright { display: inline; float: right; margin-left: 24px; margin-top: 4px;}#content .aligncenter,#content img.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto;}#content img.alignleft,#content img.alignright,#content img.aligncenter { margin-bottom: 12px;}#content .wp-caption p.wp-caption-text { background-color:#F1F1F1; color:#333; margin-top:-20px; margin-right:-2px; margin-bottom:0px; font-size: 12px; padding:8px; text-align:center; font-style:italic;}#content .wp-caption .size-full,#content .wp-caption .size-large,#content .wp-caption .size-medium,#content .wp-caption .size-thumbnail,#content .wp-caption .size-thumbnail { background-color:#F1F1F1;}#content .size-full,#content .size-large,#content .size-medium,#content .size-thumbnail,#content .size-thumbnail { background-color: transparent; line-height: 18px; margin-bottom: 10px; padding: 6px; text-align: center;}#content .wp-smiley { margin: 0;}/* gallery shortcode auto generates: .gallery-item, img, .gallery-caption */#content .gallery .gallery-caption { color: #333; font-style:italic; font-size: 12px; text-align:left !important;}#content .gallery dl { margin: 0;}#content .gallery dd {clear: both;} /* captions on the bottom! */#contentx .gallery br+br { display: none;}#content .attachment .entry-content img { /* single attachment images should be centered */ display: block; margin: 0 auto;}/* =Navigation-------------------------------------------------------------- */.navigation { color: #888; font-size: 12px; line-height: 18px; overflow: hidden;}.navigation a:link,.navigation a:visited { color: #888; text-decoration: none;}.navigation a:active,.navigation a:hover { color: #ff4b33;}.nav-previous { float: left; width: 50%;}.nav-next { float: right; text-align: right; width: 50%;}#nav-above { margin: 0 0 18px 0;}#nav-above { display: none;}.paged #nav-above,.single #nav-above { display: block;}#nav-below { margin: 4px 0 0 0;}/* =Comments-------------------------------------------------------------- */#comments { clear: both;}#comments .navigation { padding: 0 0 18px 0;}h3#comments-title,h3#reply-title { color: #000; font-size: 20px; font-weight: bold; margin-bottom: 0;}h3#comments-title { padding: 24px 0;}.commentlist { list-style: none; margin: 0;}.commentlist li.comment { border-bottom: 1px solid #e7e7e7; line-height: 24px; margin: 0 0 24px 0; padding: 0 0 0 56px; position: relative;}.commentlist li:last-child { border-bottom: none; margin-bottom: 0;}#comments .comment-body ul,#comments .comment-body ol { margin-bottom: 18px;}#comments .comment-body p:last-child { margin-bottom: 6px;}#comments .comment-body blockquote p:last-child { margin-bottom: 24px;}.commentlist ol { list-style: decimal;}.commentlist .avatar { position: absolute; top: 4px; left: 0;}.comment-author {}.comment-author cite { color: #000; font-style: normal; font-weight: bold;}.comment-author .says { font-style: italic;}.comment-meta { font-size: 12px; margin: 0 0 18px 0;}.comment-meta a:link,.comment-meta a:visited { color: #888; text-decoration: none;}.comment-meta a:active,.comment-meta a:hover { color: #ff4b33;}.commentlist .even {}.commentlist .bypostauthor {}.reply { font-size: 12px; padding: 0 0 24px 0;}.reply a,a.comment-edit-link { color: #888;}.reply a:hover,a.comment-edit-link:hover { color: #ff4b33;}.commentlist .children { list-style: none; margin: 0;}.commentlist .children li { border: none; margin: 0;}.nopassword,.nocomments { display: none;}#comments .pingback { border-bottom: 1px solid #e7e7e7; margin-bottom: 18px; padding-bottom: 18px;}.commentlist li.comment+li.pingback { margin-top: -6px;}#comments .pingback p { color: #888; display: block; font-size: 12px; line-height: 18px; margin: 0;}#comments .pingback .url { font-size: 13px; font-style: italic;}/* Comments form */input[type=submit] { color: #333;}#respond { border-top: 1px solid #e7e7e7; margin: 24px 0; overflow: hidden; position: relative;}#respond p { margin: 0;}#respond .comment-notes { margin-bottom: 1em;}.form-allowed-tags { line-height: 1em;}.children #respond { margin: 0 48px 0 0;}h3#reply-title { margin: 18px 0;}#comments-list #respond { margin: 0 0 18px 0;}#comments-list ul #respond { margin: 0;}#cancel-comment-reply-link { font-size: 12px; font-weight: normal; line-height: 18px;}#respond .required { color: #ff4b33; font-weight: bold;}#respond label { color: #888; font-size: 12px;}#respond input { margin: 0 0 9px; width: 98%;}#respond textarea { width: 98%;}#respond .form-allowed-tags { color: #888; font-size: 12px; line-height: 18px;}#respond .form-allowed-tags code { font-size: 11px;}#respond .form-submit { margin: 12px 0;}#respond .form-submit input { font-size: 14px; width: auto;} /* =Widget Areas-------------------------------------------------------------- */.widget-area ul { list-style: none; margin-left: 0; margin-bottom: 10px;}.widget-area ul ul { list-style: square; margin-left: 1.3em;}.widget_search #s {/* This keeps the search inputs in line */ width: 60%;}.widget_search label { display: none;}.widget-container { margin: 0px 0 18px 0;}.widget-area {padding-right:0px;}.widget-title { color: #222; font-weight: bold;}.widget-area a:link,.widget-area a:visited { text-decoration: none;}.widget-area a:active,.widget-area a:hover { text-decoration: underline;}.widget-area .entry-meta { font-size: 11px;}#wp_tag_cloud div { line-height: 1.6em;}#wp-calendar { width: 100%;}#wp-calendar caption { color: inherit; font-size: 14px; font-weight: bold; padding-bottom: 4px; padding-left: 2px; text-align: left;}#wp-calendar thead { font-size: 11px;}#wp-calendar thead th {}#wp-calendar tbody { color: inherit;}#wp-calendar tbody td { background-color: rgba(0, 0, 0, .06); border: 1px solid #fff; padding: 3px 0 2px; text-align: center;}#wp-calendar tbody .pad { background: none;}#wp-calendar tfoot #next { text-align: right;}#wp-calendar a { font-weight:bold; font-style:italic;}.widget_rss a.rsswidget { color: #000;}.widget_rss a.rsswidget:hover { color: #ff4b33;}.widget_rss .widget-title img { width: 11px; height: 11px;}/* Main sidebars */#main .widget-area ul { margin-left: 0; padding: 0 10px 0px 0; /* changed from 20 to 10 */}#main .widget-area ul ul { border: none; margin-left: 1.3em; padding: 0;}#primary {}#secondary {}/* Footer widget areas */#footer-widget-area {}/* Weaver widget areas and templates */#ttw-top-widget,#ttw-bot-widget,#ttw-site-top-widget,#ttw-site-bot-widget,#per-page-widget { /* default styling for our top/bottom widget areas */ margin-left: 50px; margin-right: 50px; margin-top: 0px; overflow: hidden; width: 600px;}#ttw-top-widget,#ttw-site-top-widget,#per-page-widget { margin-bottom: 10px;}.one-column #ttw-top-widget,.one-column #ttw-bot-widget,.one-column #ttw-site-top-widget,.one-column #ttw-site-bot-widget,.one-column #per-page-widget { margin-left:60px !important; margin-right:auto !important; width: 800px !important;}.one-column-iframe #ttw-top-widget,.one-column-iframe #ttw-bot-widget,.one-column-iframe #ttw-site-top-widget,.one-column-iframe #ttw-site-bot-widget,.one-column-iframe #per-page-widget { margin-left:60px !important; margin-right:auto !important; width: 800px !important;}#ttw-head-widget { height:36px; margin-bottom:10px; text-align: right; padding:2px; display:inline;}#ttw-head-widget .textwidget { display:inline; margin-left: 10px;}/* Right Alt template */.right-alt #container { float: left; margin: 0 0px 4px 0; width: 700px;} /* width-200-40 700px? */.right-alt #content { float: left; margin:0 0px 10px 0px; overflow:hidden; padding: 5px 0px 0px 20px; width: 670px;}.right-alt #content img { max-width: 660px;}#altright { float: right; overflow: hidden; width: 220px; margin: 0 0 4px 0;} /* Left alt template */.left-alt #container { float: right; margin: 0 -240px 4px 0; width: 100%;}.left-alt #content { margin: 0px 240px 4px 0px; width: 658px; padding: 10px 15px 5px 25px;}.left-alt #content img { max-width: 650px;}#altleft { float: left; width: 220px; padding-left: 15px; margin-bottom:4px; overflow:hidden;}/* multiple columns */div.multi-content-col-left { float: left; width: 47%; padding-right: 3%;}div.multi-content-col-right { float: left; width: 47%;}div.clear-cols { clear: both;} /* =Footer-------------------------------------------------------------- */#ttw_ftable { border:0; width:98%; margin:0; padding:0;}#ttw_ftdl { text-align:left;}#ttw_ftdr { text-align:right;}#footer { margin-bottom: 5px; margin-top:2px;}#colophon { border-top: 4px solid #000000; margin-top: -4px; padding: 10px 0; overflow: hidden;}#site-info { float: left; width: 100%; font-weight: normal; font-size: inherit; margin-left:10px; padding-top: 4px;}#site-info a { color: #888888; text-decoration: none;}#site-generator { position: relative; font-style: italic; float: right; width: 100%;}#site-generator a { color: #888888; display:inline-block; text-decoration: none; background: url(images/wordpress.png) center left no-repeat; padding-left: 19px; line-height: 16px; margin-left: 1px;}#site-generator a:hover { text-decoration: underline;}img#wpstats { display:block; margin: 0 auto 10px;} /* =Mobile Safari ( iPad, iPhone and iPod Touch )-------------------------------------------------------------- */pre { -webkit-text-size-adjust: 140%;}code { -webkit-text-size-adjust: 160%;}#access,#access2,.entry-meta,.entry-utility,.navigation,.widget-area { -webkit-text-size-adjust: 120%;}#site-description { -webkit-text-size-adjust: none;}/* =Print Style-------------------------------------------------------------- */@media print { body { background: none !important; } #wrapper { clear: both !important; display: block !important; float: none !important; position: relative !important; } #header { border-bottom: 2pt solid #000; padding-bottom: 18pt; } #colophon { border-top: 2pt solid #000; } #site-title, #site-description { float: none; line-height: 1.4em; margin: 0; padding: 0; } #site-title { font-size: 13pt; } .entry-content { font-size: 14pt; line-height: 1.6em; } .entry-title { font-size: 21pt; } #access, #access2, #branding img, #respond, .comment-edit-link, .edit-link, .navigation, .page-link, .widget-area { display: none !important; } #container, #header, #footer { margin: 0; width: 100%; } #content, .one-column #content { margin: 24pt 0 0; width: 100%; } .wp-caption p { font-size: 11pt; } #site-info, #site-generator { float: none; width: auto; } #colophon { width: auto; } img#wpstats { display: none; } #site-generator a { margin: 0; padding: 0; } #entry-author-info { border: 1px solid #e7e7e7; } #main { display: inline; } .home .sticky { border: none; }}
  21. While I'm at it, and I hope this doesn't bother anyone. a major change of topic. Namely, how do I make my background image cover everything and gets cut below let's say 100px below my content. I got to this http://www.w3schools.com/cssref/playit.asp?filename=playcss_background-clip&preval=content-box but I'm not sure what it tells me. I suspect something with background-clip: 50px; or something, but that doesn't work. /Len
  22. Oh! haha thanks alot /Len
  23. Hello! I've tried to use text-indent:2em; and text-indent:100px; to a paragraph and it doesn't work. I've copy-pasted CSS and HTML below. I want to indent paragraph 2 <p2> and it seems to find it because I can change color and so on. Anyone have any idea what's wrong here? CSS:html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, font, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline;}/* remember to define focus styles! */:focus { outline: 0;}body { line-height: 1; color: black; background: white;}ol, ul { list-style: none;}/* tables still need 'cellspacing="0"' in the markup */table { border-collapse: separate; border-spacing: 0;}caption, th, td { text-align: left; font-weight: normal;}blockquote:before, blockquote:after,q:before, q:after { content: "";}blockquote, q { quotes: "" "";}/* up to this is css reset*/body { background: #F0F0F0;}a:link {text-decoration:none;}a:hover {color:green;}a:active {}a {color:black; font-size:20px;} .home {color:blue;}.documents {color:blue;}.about {color:blue;}.resources {color:blue;}table, tr, th, td { border: 1px solid black; padding: 4px;}.headresources {font-size:40px;}p2.paragraf { text-indent:2em;}HTML<!DOCTYPE html><html><title>Home</title><head><link rel="stylesheet" href="CSS.css" type="text/css"></head><body><ul><li><a class="home" href="Home.html">Home</a></li><li><a href="Documents.html">Documents</a></li><li><a href="Resources.html">Resources</a></li><li><a href="Four/About.html">About</a></li></ul><br><h1><b>My First Heading</b></h1><p> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis <b>egestas. Vestibulum</b> tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, </p><br><p2 class="paragraf">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, </p2></body></html>
×
×
  • Create New...