drjohn 56 Posting Pro in Training

You probably need a wrapper div around the content, set to a width that matches your design and that will work in most viewport sizes. If you are designing for the viewport being at full screen it is very common to run into this sort of problem. But as you are at least testing it by reducing the viewport size, you are thinking of other users, which is a good start.

drjohn 56 Posting Pro in Training

Or you should do it the way everyone else does, create a wrapper div around the content and give the div the width. Then every paragraph inside that div will be constrained to that width. It's not normal to give the p tag a wdith.

drjohn 56 Posting Pro in Training

What he says ^

And you can do this from a single form by using a series of queries, one after the other, each with it's own connection. (MySQL can't chain queries, each has to be a separate event.)

drjohn 56 Posting Pro in Training

It's a table of data, use a table, that's what they were invented for.

drjohn 56 Posting Pro in Training

Set width:100% and height:100% for the image
However this will always distort the image unless the div is the same size as the image.

A background image is a valid thing in ALL browsers. Are you thinking of positioning your links over specific parts of the image? If so, what will happen if someone has images disabled to reduce bandwidth and increase the speed of loading a page, perhaps on their mobile phone?? This is a flawed idea.

drjohn 56 Posting Pro in Training

Because I believe that some processing takes place on Google's server to make it work. I think (but I might be wrong) that you having the font on your server is not going to work. I haven't played with these fonts on google because when first looked there were only a very small number to choose from. But if you read the bit where google tells you how it works, it might say what they are doing in more detail and explain things. I was under the impression that to make it work you had to use the google link.

drjohn 56 Posting Pro in Training

Entering an ID will not get the other fields filled automatically. you'd have to run a query on the ID and the table, then recreate the page with the data place and send it to the user.

drjohn 56 Posting Pro in Training

no comma required after StoreName) in the first table definition

drjohn 56 Posting Pro in Training

In a database, the order of the columns in the table is TOTALLY irrelevant. The same is true for the order of the rows. This is an important basic concept in relational databases.

In other words it just doesn't matter at all, you write your query and STATE the columns you wish to be working with, in whatever order suits yours query.

eg table people with columns address, firstName id, town, surname, age, postcode/zipcode can be queried in any order you choose, such as
select id, surname, firstName, address, town postcode/zipcode from people.
or
select age, firstName, surname, town from people.

drjohn 56 Posting Pro in Training

No, it is NOT a database, it's an object orientated class definition for connecting and querying a database.

drjohn 56 Posting Pro in Training

It's over-complicated, and probably intended to solve problems in IE6.
748 lines of css is rather a lot, especially if we are supposed to look at it and solve problems.

drjohn 56 Posting Pro in Training

Start again, with less divs. Especially less deeply nested divs

eg

<div class="colmask holygrail">
	<div class="colmid">
		<div class="colleft">
			<div class="col1wrap">
				<div class="col1">			

					
				<div class="content">
					<ul class="menu">
	<li class="home"><a href="index.php?module=home">Home</a></li>
	<li class="hair"><a href="index.php?module=hair">Hair</a></li>

	<li class="beauty"><a href="index.php?module=beauty">Beauty</a></li>
	<li class="tanning"><a href="index.php?module=tanning">Tanning</a></li>
	<li class="contact"><a href="index.php?module=contact">Contact</a></li>
	<li class="navend"></li>
	</ul>

The menu is nested inside a div inside a div inside a div inside a div inside a div inside a div! Things should be a lot simpler than this, which in turn makes troubleshooting a lot simpler.

If a div has width:100%, floating left or right does nothing, as it has already filled the available space.

Having float:left, followed immediately by float:right means it will be floated right, so DELETE the float left, it is doing nothing.

And try starting with a fixed width wrapper div, which will stop the problem. But just adding that around everything would increase the level of nesting. Hence the start again advice.

drjohn 56 Posting Pro in Training

Current browsers will not change their CSS support, it is only when new releases occur that they will start supporting CSS3. So when Firefox 4 or IE9 comes out, you will read about the new improved level of CSS3 support. But as CSS3 is still at the discussion stage, don't expect anything to change for several years. Just stick to using CSS2 and the odd bits that FF supports, and accept that without adding JS support for a few features, IE8 users (and those with even older versions) will not see the extras you add. It is not a problem in any way. Just don't imagine that your CSS2 designs will suddenly stop working - they will not.

drjohn 56 Posting Pro in Training

WHY would you need this info?

All current browsers support css2, no browser supports more than a couple of bits of css3. The latest versions of firefox support a few more bits of css3 than most other browsers, but as css3 is still only at the discussion stage, you should just work with css2, unless you have a specific bit of code that you wish to use and you know the javascript alternative to use for other browsers, or just accept that it will not be displayed in other browsers. Because if the browser can't read your code, it just ignores it.

So, if you really need to know the version of css used, the answer is almost always css2, as css3 hasn't been got past the discussion stage.

drjohn 56 Posting Pro in Training

just change the image used in the hover bit

background: url("rollover-image2.gif") 0 0 no-repeat;

drjohn 56 Posting Pro in Training

as above ^

Your table is not normalised and forces you to use bad code to find the children. Imagine checking to see if fred has a child called jimmy - you'd have to query each column via an or, whereas with a proper;y normalised database, you'd just search on user=fred and child = jimmy.

table = users - their data
table userkids - user and childname, that's all (unless you need to store more about each child)

Then your select for the drop down is just child where username = whatever.

drjohn 56 Posting Pro in Training

Just visit the web site without adding a page after the domain name. What you see is the index page, the default page shown for the domain. you have been doing this for years when browsing the web.

drjohn 56 Posting Pro in Training

Just edit your PHP script to send it to two destinations.
Normally you build up the message in steps from each field, so just add a bit for a cc as well or if you don't want to do that, repeat the entire code in the same script, but with a different destination.

drjohn 56 Posting Pro in Training

You are linking to folders with your code. Without an index page, your system is returning instead a file listing, which always does what you don't like.

So make an index.htm page for each folder, listing the files and linking to them. And make the link not to the folders, but the index pages.

drjohn 56 Posting Pro in Training

You can't use html and css to do this.


You will need to use PHP - use google to find php uploader scripts.

Of course the question then arises - what are you going to do with these images and things? If you plan to use them to dynamically style pages, you'll probably need a database that stores the file names. And as you are a beginner, from the question you asked and the way you asked it, you are effectively asking for someone to build you a web site. Because that would need a lot of custom coding to make dynamic pages.

drjohn 56 Posting Pro in Training

Give the li a href of the menu some padding (equal to the width of the icon) to push it in a bit from where the icon will appear.

drjohn 56 Posting Pro in Training

edit your css to include
img {border:0}

If you want rid of the underline on all hyperlinks, also add

a {text-decoration:none;}

drjohn 56 Posting Pro in Training

WHY would anyone want to sign up with an unknown email provider, when they can use major free providers such as gmail or hotmail, with more facilities?

drjohn 56 Posting Pro in Training

Remembering of course that w3schools tutorials are well known to be out of date or contain errors, and they have no relationship to wc3, the web consortium that sets web standards...

drjohn 56 Posting Pro in Training

use a background image that is semi transparent.

drjohn 56 Posting Pro in Training

order by is ordering it in alphabetical order in your opening post.

that's why you need a different approach, using the date data type and then getting at the year and month. (which are stored as numbers)

drjohn 56 Posting Pro in Training

REQUIRE "connect_to_mysql.php";
means you must have a file of that name, which will then contain your connection details.

So, is the opening bit of PHP code you give saved in a file called connect_to_mysql.php and in the same folder as the other file that uses it?

drjohn 56 Posting Pro in Training

change float:left to float:right on line 197

diafol commented: He asked for it. Ha ha ha. +6
drjohn 56 Posting Pro in Training

<h3><span>content in here</span></h3>

h3 span{css in here}

You do know you can give the h3 tag a width...

Also <span class="h3"> </span> is probably invalid, as h3 is reserved as a tag name.

drjohn 56 Posting Pro in Training

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.corporate-event.com.au%2F

27 errors. So start by correcting them, where possible.

You should not be using the center tag, use standard ways to center your layout.
i.e.
Add a <div id="wrapper"> around your entire content inside the body, and set its margin:auto; and give it a width of 750px (it doesn't work without a width). Also 750px is a bit small these days, I'd suggest 950px would be better.

After that, come back and we'll have another look.

PS some of the errors are because XHTML is very fussy, and besides, it gives you no advantages what so ever, as it gets displayed as html in IE.

drjohn 56 Posting Pro in Training

position:relative.
Always.

Float divs to get them side by side.

drjohn 56 Posting Pro in Training

Because you told it too...

#nav > li:hover { top:5px; background-color:#3d3f44; -moz-border-radius:10px; -webkit-border-radius:10px; border:1px Solid #999; }

top:5px; is pushing it down by 5px. change it to zero or delete it and it will stop moving.

drjohn 56 Posting Pro in Training

Without your actual homework scenario, we can't make it relational.

And I don't do other people's homework, although I might point out errors and give hints if you attempted it..

drjohn 56 Posting Pro in Training

http://reference.sitepoint.com/html/base

It's something I've never seen used, but the above explains it. I'm surprized you're seeing it, as I haven't seen it in the ten years I've been working on web pages.

drjohn 56 Posting Pro in Training

i would say CSS and if you want extra stuff added to it to make it look a little more 'cool' then you should use jquery or java.

I strongly suggest to never use a pure jav menu as some people have java turned off and they won't be able to use the menu properly meaning they wont see the rest of your site.

Never, ever, ever, use Java for a menu - it is total overkill. And when Java does an update and then your browser detects the menu was written in an older version, the user gets asked if they wish to continue - every single time a bit of Java runs!

Use CSS, with some Javascript to enhance it, as suggested by several others (and using Jquery makes the script very easy to write, and there are many good free examples you can borrow). But never use Java, it's a high end full-on programming language for making applications.

cguan_77 commented: thank you drjohn :) +0
drjohn 56 Posting Pro in Training

Extract the files, and try loading them into a spreadsheet, such as excel. Then save as as text file, tab delimited. ~then create your database tables with th ecolumns in the same order as in your file. then use the mysql load data infile or load data local infile command to insert the data in bulk.

This is a manual process.

drjohn 56 Posting Pro in Training

Run a query to count the number of records.

Then use an IF statement in your programming language (PHP?) to use one of two queries - one your original top five / bottom five union, the other is just a select with no limit.

This is not a database problem, it is a logic problem.

drjohn 56 Posting Pro in Training

Why not just do it in the programming language BEFORE the query is submitted?

eg

if (referenceID is null) referenceID = attID

because your problem is NOT a database query one, it's a data entry one.

drjohn 56 Posting Pro in Training

Most people use the son of suckerfish method, which you'll find at www.htmldog.com

Not sure what you're getting at with your second post. Late on a Sunday night, in my time zone, when your post was made, I tend not to look at the forum. So if you were expecting an instant response, do allow those who help to do their own things occasionally.

And do come back for more help, of course.

PS your method above will not work in all browsers (display:table and display:table-cell are not fully supported). Also you seem to have a few extra classes you don't actually need. But son of suckerfish will help you get round these errors.

drjohn 56 Posting Pro in Training

ERD/normalisation are for database design. Nothing to do with programming - totally independent of it in fact.

UML is for object orientated design. To do with programming.


Two different subjects.

drjohn 56 Posting Pro in Training

You can't.

They scroll and have a scrollbar, or they have no scrollbar and can't scroll.

drjohn 56 Posting Pro in Training

give the links in your main nav a class or more normally, give the <ul> containing all the <li>s a class or id, and then stick the class/id name in front of your style declarations.

eg <ul id="nav"><li>your nav links in here...

then make the css like this first example, for each declaration

#nav a:link{
font-family:"Berlin Sans FB Demi";
text-align:center;
color:black;
text-decoration:none;
}

Some people put the nav in its own div, and give that an id or class instead

PS There is no way you can be sure that your site visitors have the font Berlin Sans FB Demi (I certainly don't) so some random font will be substituted instead and wreck your layout/ideas. Start by using a font-family, with your desire3d font first, then a close substitute for windows next, then a close sub that might be for a Mac, then perhaps a more general windows font, and finally a generic type (serif or sans serif)

drjohn 56 Posting Pro in Training

Between 0 and 9 works when the field is integer datatype. Who or what has a name that is an integer between 0 and 9. So the whole query just does not make sense. And then you admit that you have strings as names, so the datatype is probably char or varchar.

I suggest you re-think what you are doing with the name field and its datatype. Also, what if someone had the name 11 - they would be excluded of course, as would john21...

drjohn 56 Posting Pro in Training

Also, the text got there because YOU put it there...

Ardav's post above sums it up - most people try hard to include this for good reasons like accessibility. It's a bit like objecting to your car having brakes because you want to drive fast, not slow.

drjohn 56 Posting Pro in Training

You found that site? Gosh and you even based your username on it, you were so impressed. Must be good.

Pity about the Java icon next to a JavaScript tutorial...

drjohn 56 Posting Pro in Training

Every language has certain terms, called reserved words, that have a specific meaning. The answer is simple - do NOT use these words for anything other than their intended meaning. eg you would not give a column in a database the name table or create or if or while as these are reserved words. You should really rename the column to something else rather than use the ' ' around it. It is VERY bad practice to use reserved words as column names or variable names. It is likely to cause you problems.

drjohn 56 Posting Pro in Training

Have a look at some of the jQuery solutions in this straightforward tutorial, as some of them do roughly what you are after. You don't need to uinderstand jQuery to use the pre-made solutions presented here.

http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/

Alternatively, have a look at the accordian effect on any page other than the index page of the festivals site in my siggy, and then the pop-up lightbox/pop-up effect when you click on a link to any festivals site.

You can adapt the pop-up to suit your tastes - I got it from http://gettopup.com/ - see the Inline DOM example in topup's example set, I think that would suit you perfectly.

PS that's not a drop-down, it's a pop-up ;)

drjohn 56 Posting Pro in Training

It looks as if your query is giving you exactly the correct results.

If you want a count(*) then you need to use a group by condition, and also, amazingly, include count(*) in the original query.

But in case you haven't noticed, the count for the two desired rows you have given is wrong - there is ONE title1 with name1, one title1 with name2, one title2 with name3 and one title3 with name4.

Do you really want, instead, a count of how many rows title1 is associated with in the second table, and how many rows title2 is associated with in the second table?

Onisutra commented: thanks +2
drjohn 56 Posting Pro in Training

Adding the meta tag <meta http-equiv="X-UA-Compatible" content="IE=7"> to the head will not break your site in IE7 and IE8, nor will removing it cure any fault in IE7. If the site was broken in IE7 with that meta tag, it was also broken without it - because only IE8 reads that tag! And it switches IE8 into IE7 mode. Unless the missing closing > in your quoted code was really missing of course ;)
That would break your page big style...

And when I looked at your site, it didn't look broken in IE7 or IE8, it looked the same as in Firefox.

Oh, and you don't put <meta http-equiv="X-UA-Compatible" content="IE=7"> in the index file.

You have to put it in the head of EVERY file, if you are using some css hack that works in IE7 but not in IE8, and wish IE8 to run as IE7.

drjohn 56 Posting Pro in Training

select * from mytable where 1=1

??