-
Content Count
14,397 -
Joined
-
Last visited
-
Days Won
99
Content Type
Profiles
Forums
Calendar
Everything posted by Ingolme
-
That can be solved too... I just keep messing up.Change your HTML code so that it's like this (adding a new <div class="conten">: <div class="topleft"><div class="topright"><div class="topmid"><!-- Nothing here --></div></div></div><div class="left"><div class="right"><div class="mid"><div class="content"><!-- Begin content --><!-- End content --></div></div></div></div><div class="bottomleft"><div class="bottomright"><div class="bottommid"><!-- Nothing here -->&
-
Maybe the UL width will take effect if you declare the document width first:html,body {width: 100%;}I have no guarantee it will work.Strangely enough, your ul tag seems to have a margin on both the left and right. I don't know why.
-
That error means that the file (getcitiy.php) wasn't found on the server. Seeing as it was spelled wrong it's not a surprise the error was returned. It's called a 404 error, one between a list of errors that the servers have programmed to handle certain requests.
-
Well, the action attribute of the <form> tag was misspelled. You can make the form submit when you select an option by doing this:<form action="getcity.php" method="get" id="myForm"><select name="country" onchange="document.getElementById('myForm').submit()"><option value="">select:</option><?php$result = mysql_query("SELECT DISTINCT country FROM cities");while ($row = mysql_fetch_assoc($result)){echo "<option value=\"{$row['country']}\">{$row['country']}</option>";}?></select></form>
-
Well, you might want to submit the form first:<form action="getcitiy.php" method="get"><select name="country"> <option value="">select:</option> <?php $result = mysql_query("SELECT DISTINCT country FROM cities"); while ($row = mysql_fetch_assoc($result)) { echo "<option value=\"{$row['country']}\">{$row['country']}</option>"; } ?></select><input type="submit" value="Select" /></form>
-
1) I am not sure if I'm right, but I think that this is because the UL element, being a block, has the same width as the body, and when you move it 25%, the entire document is stretched by 25% (body's width + 25%).To solve it you can try giving the UL element a width of 75% to compensate the 25% you added to the left of it:ul#logo{ position:relative;top: 150px;left: 25%;width: 75%;padding-left: 20px;list-style: none;text-transform: uppercase;font-size: .9em;letter-spacing: .1em;}ul#mainmenu{ position:relative;top: 170px;left: 25%;width: 75%;padding-left: 20px;list-style: none;}2)This CSS:a:lin
-
Oh, just change the part of code for .mid so that it's like this:.mid {background: url(skin/message/b_05.gif) center left no-repeat #FFFFFF;padding-left: 28px;}
-
If you want to "fix" the div's position and size relative to its container you can do this: <div style="position: relative; width: 70%;"><!-- container -->Some content<div style="position: absolute; bottom: 0px;"><!-- this div is set to always be on the bottom of its container, not of the full page -->Something else</div></div>
-
OK, Sorry for the result before, I hadn't tested it myself before. This one works for me: .topleft {background: url(skin/message/b_01.gif) top left no-repeat;}.topright {background: url(skin/message/b_03.gif) top right no-repeat;padding: 0px 20px 0px 28px;/* The first and third should be 0px, the second is the widthof the top right corner image and the fourth is the widthof the top left corner image */}.topmid {background: url(skin/message/b_02.gif) top right repeat-x;height: 17px; /* This height must be the height of the background image used */}.left {background: url(skin/message/b_04.gif)
-
That's far more than HTML, it uses PHP and other server side laguages. It's really complicated. I recommend reading W3Schools' PHP or ASP tutorials.
-
But when the position is set to fixed, I think the div doesn't inherit anything from its container.
-
I think this should work. I've applied the widths and heights of the given images. .topleft {background: url(skin/message/b_01.gif) top left no-repeat;}.topright {background: url(skin/message/b_03.gif) top right no-repeat;}.topmid {background: url(skin/message/b_02.gif) top right repeat-x;height: 17px; /* This height must be the height of the background image used */padding: 0px 20px 0px 28px;/* The first and third should be 0px, the second is the widthof the top right corner image and the fourth is the widthof the top left corner image */}.left {background: url(skin/message/b_04.gif) top lef
-
You're right, but I never studied Regular Expressions. I should do that. The RegExp part of the Javascript reference on W3Schools is actually pretty new, I had never seen it before and I check it often. I glanced at it a week or two but never started learning it because I haven't had much time.
-
But position:fixed, means that the position coordintes are relative to the window and not the parent. Why do you need a div with a fixed position if it's inside another one?Maybe you can give an example of what you want your page to be like.
-
But it still won't solve the problem of putting a paragraph and an image next to eachother...
-
It depends on the server settings. Usually you upload a "favicon.ico" file to the top level of the site. You can also put this tag in your HTML document:<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />Change "favicon.ico" for the icon file.I'm afraid you'll need to find software that converts imagesd to icon format.
-
You must give each form element an ID and then add a line of code for each of them. Then you add that to the function I gave you previously.For example, here if the form and the javascript for each element:...<input type="text" id="element1" /><input type="text" id="element2" /><input type="text" id="element3" /><textarea id="element4" cols="30" rows="4"></textarea>...isIncomplete = false;if(document.getElementById("element1").value.length == 0) formSubmit = 0; isIncomplete = true;if(document.getElementById("element2").value.length == 0) formSubmit = 0; isIncomple
-
Tables are a really bad way to display websites. And embedding tables within tables is not a good idea.To make the content be well placed I think this should work:<td width="790" valign="top">Context goes here</td>
-
I wouldn't ever use BMP on the internet, that's a really big format. If what you want is to make the color blend into the background, why not use a PNG with transparency rather than trying to make it equal with the background color?
-
I have this function to validate Emails:Put this in the <head> of the document: function formValidate(aform,mail) { formSubmit = 1; atPosition = document.getElementById(mail).value.indexOf('@'); dotPosition = document.getElementById(mail).value.lastIndexOf('.'); dist = document.getElementById(mail).value.length; domain = document.getElementById(mail).value.substr(dist-3,3); if(document.getElementById(mail).value == "") { formSubmit = 0; alert("You must provide an E-mail address"); } else if (!dotPosition || !atPosition || atPosition < 1 || dotPosition < (at
-
I recommend haveing a table "cities".Here's an example of how it could look: cities table:Name | Country--------------------------------Madrid | SpainNew Jersey| U.S.AParis | FranceBarcelona | SpainNew York | U.S.A To get all the cities of a country:SELECT * FROM cities WHERE country = 'Spain'To get all the countries available:SELECT DISTINCT country FROM cities
-
The way to get an attribute from an XML node is the following:xmlDoc.getElementsByTagName("Alertinfo")[0].getAttribute("status");
-
Yes, CSS loads much faster than HTML tables. HTML tables are pretty unefficient.
-
I don't know, I'm just suggesting because I've never used subqueries, so I can't be sure exactly how they work. If performing the query before works ok then at least your script will be working.Maybe somebody else can find a different solution.
-
Maybe you should do the other query first and add it into the second query after. Like this:$res0 = mysql_query("SELECT post_id FROM db1.table2 WHERE field1=9795",$dbc1);$row0 = mysql_fetch_array($res0);$sql1 = "SELECT * FROM db1.table1 WHERE field1=(".$row0['post_id'].")";$result1 = mysql_query($sql1,$dbc1);while($row1 = mysql_fetch_assoc($result1)){echo $row1['field1'].'<br />';}