Arkinder 93 Posting Pro in Training

Correct me if I'm wrong but Amaya is the W3C browser, isn't it?

Amaya is, and I had actually forgotten about it until now (probably because I knew it as Tamaya). I personally view it as more of an editing tool rather than an actual browser. However at one point in time Mozilla was the official browser (don't quote me on this as I still can't find the documentation, but I have it saved somewhere). I guess that was just quite a while ago. :P

http://www.whatwg.org/ is also a similar reference to W3C

This is actually really interesting - specifically the second paragraph.

What is the WHATWG?

The Web Hypertext Application Technology Working Group (WHATWG) is a growing community of people interested in evolving the Web. It focuses primarily on the development of HTML and APIs needed for Web applications.

The WHATWG was founded by individuals of Apple, the Mozilla Foundation, and Opera Software in 2004, after a W3C workshop. Apple, Mozilla and Opera were becoming increasingly concerned about the W3C’s direction with XHTML, lack of interest in HTML and apparent disregard for the needs of real-world authors. So, in response, these organisations set out with a mission to address these concerns and the Web Hypertext Application Technology Working Group was born.

This is because when XHTML was introduced everyone thought it was a stricter version of HTML that was meant to replace HTML - W3Schools included :). But it wasn't, and still isn't. XHTML is …

Arkinder 93 Posting Pro in Training

WOW, I didn't realize someone would nerd rage so much over trying to help someone else.

limonzmn, apparently I don't know what I am talking about. With that said, I've used W3Schools.com for years and have been doing just fine.

Arkinder, please feel free to post where every error is as this will help people to not say it is a "good" resource. However, since you don't seem to be the most professional person, please forgive me for not just taking your word for it.

On a side note if you plan on learning HTML5, I've enjoyed reading the DiveIntoHTML5 by Mark Pilgram: http://diveintohtml5.info/

Arkinder, please feel free to tell us how this is a terrible resource as well and where all the mistakes are.

Proper arguments would really be encouraged rather than bashing someone.

Start here: w3fools. If that isn't enough then I will be more than happy to give you more links. I would hardly call it a "nerd rage." After all, I did apologize for the bluntness of the statement. Obviously the professional way to handle things is to ask me to bash every link that you post. If you really want to give me something to bash, post a link of your portfolio. After your years of experience I'm sure it is quite lengthy.

I have not ever met a well known web designer that uses W3schools, and it is with good reason. Not just because of incorrect information, …

Arkinder 93 Posting Pro in Training

W3Schools.com is only a horrible reference in your opinion. From what I see HTML Dog is a horrible reference, but, that is just my opinion.

W3Schools.com, does not have video tutorials, however with each tutorial, you are able to try out the examples right on their site. That is how I started and it still helps me from time to time to this day. Check it out, and if you don't like it, ask for more suggestions. I would say to stay away from W3C as you will probably just get confused.

Not at all, W3schools contains incorrect information in every single tutorial that it offers. Being wrong does make a horrible reference; unless of course you enjoy blindly stabbing in the dark for an answer because you don't know what the hell you're doing. If you are still using W3schools as a reference then you really should not be trying to teach other people because you clearly do not know what you are talking about. I apologize for my bluntness on the situation, but I am absolutely sick of people posting W3schools as a "good" place to learn HTML, CSS, or any markup/language. It is simply a bad site.

While I won't disagree that the W3C could be confusing to a beginner, it doesn't mean that he or she shouldn't know about it. The most accurate information, and explanations for why why the HMTL markup and CSS language work the way they do is …

Arkinder 93 Posting Pro in Training

As far as ideas there are more than either of could count. However, ideas are useless if you cannot actually implement any of them. Start by learning the basics, HTML and CSS, then move into the more complex high-level languages.

A few places to start at: Google, Mozilla, HTML Dog , and W3C.

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

You are still using HTML 5 tags which do not exist to IE7. If you are wanting to switch your markup to HTML 4 make sure that you also change your DOCTYPE to HTML 4.01 Strict.

HTML 4 Reference

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

A few specific places to try: Google, Mozilla, HTML Dog , and W3C.

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

Joomla is a CMS (Content Management System). W3schools is a horrible reference. A few better places: Google, Mozilla, HTML Dog , and W3C.

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

W3schools is a horrible reference, and it should not be used for anything other than a reference - if at all. I do not know of any "good" video tutorials, but you could still try some of these: Google, Mozilla, HTML Dog , and W3C.

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

The screen shots display fine for me. Try messing with the z-index for the button, and if that does nothing you could try position the button absolutely. Keep in mind that you should give the containing popup a relative position if you do the latter.

If none of this makes a difference I will have to look into how the scroll is actually being displayed.

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

> My professor said this is useful in the event that your program is being "attacked."

Useful, only if you are using C-style arrays of char.

Don't create a problem that did not exist in the first place, and then try to solve it; just use std::string instead. std::string is not vulnerable to buffer overflow exploits on user input; if you use the member function at() instead of [] for element access, it is safe even if there are programming errors. Unless you decide to use its buffer as a C-style array of modifiable chars, in which case you deserve to be subject to every bad thing that could possibly happen.

The second problem with restricting the number of characters that can be entered is that if the input is too long, crud is left in the stream buffer which has to be than read and discarded prior to the next input. Just reading in whatever is entered, and then truncating the string if it turns out to be too long is simpler.

Something like:

std::string name ;
    constexpr std::string::size_type MAX_CHARS = 20 ;

    if( std::cout << "name (max " << MAX_CHARS << " chars)? " && std::getline( std::cin, name  ) )
    {
        if( name.size() > MAX_CHARS )
        {
            std::cerr << name << " is too long; truncating it\n" ;
            name = name.substr( 0, MAX_CHARS ) ;
        }
        // use name
    }

    // else i/o error

This is interesting, and I never would have thought of doing it this way …

Arkinder 93 Posting Pro in Training

std::cin.getline(const_cast<char *>(name.data()), MAX_NAME_SIZE); is undefined behavior because you are not allowed to modified the pointer-to-const-char returned by data.

You could easily just use the c-style approach and convert that into a string. Or you can do something like so.

string str(' ',MAX_SIZE);
cin.getline( &(str[0]) , str.size() );

I am aware that it is undefined behavior, that is why I said it was unorthodox. Regardless, this still is not a complete solution.

Thanks anyways,
Arkinder

Arkinder 93 Posting Pro in Training

I recently had an assignment that asked us to restrict the amount of characters a user can enter for his or her name. My professor said this is useful in the event that your program is being "attacked." The simplest solution was to use C strings:

#include <iostream>

const int MAX_NAME_SIZE = 15;

int main () {
	char name[MAX_NAME_SIZE];
	std::cin.getline(name, MAX_NAME_SIZE);
	
	std::cout << name << std::endl;
	return 0;
}

However, I wanted to use C++ strings instead. Unfortunately this requires some unorthodox (to me at least) methods:

#include <iostream>
#include <string>

const int MAX_NAME_SIZE = 15;

int main () {
	std::string name(' ', MAX_NAME_SIZE);
	name.reserve(MAX_NAME_SIZE);
	std::cin.getline(const_cast<char *>(name.data()), MAX_NAME_SIZE);
	
        // optionally you could use the gcount function here to downsize the string

	std::cout << name << std::endl;
	return 0;
}

So my questions are:

  • Why was the functionality of the istream getline not included in the string getline ?
  • Is there another, preferably better, way of doing this with C++ strings?
  • Is there another, once again better, way of doing this at all?
  • Since the input buffer is pretty big, does it really slow the program down that much to prevent you from just using the resize() member function?

Any side comments are welcome.

Thanks,
Arkinder

Arkinder 93 Posting Pro in Training

It turns out that it was cygwin. During installation it gives you the option of using Unix line endings or DOS line endings. I suppose that this makes sense because cygwin is a Unix Shell IDE. Anyways, the solution is running the installer again and selecting the DOS option.

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

So would it be safe to assume that the problem is either in cygwin or the specific machine? My professor is going to look at it later today, so I'll post whatever he thinks the error is.

Thanks,
Arkinder

Arkinder 93 Posting Pro in Training

-_- Wonderful. Well, thanks for taking a look. I guess I will just wait and ask my professor about it.

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

As Dandello said, part of the problem is that the container is smaller than the total width of its child elements. The other part is that the browser window is also smaller than the total width of said child elements.

Try increasing the width of the body and make changes accordingly - such as increasing the width of the container.

body {
    background-color: #F5F5F5;
    width: 100%;
}

Regards,
Arkinder

Arkinder 93 Posting Pro in Training

I am not exactly sure what information is relevant, so my apologies for any useless/redundant information.

On my Mac (Snow Leopard 10.6.8) with xCode (gcc) compiled and run through the terminal the following works fine (ignore code and continue reading):

#include <istream>
#include <string>
#include <iostream>
#include <fstream>

enum Year {FRESHMAN, SOPHMORE, JUNIOR, SENIOR};
const std::string YearNames[4] = {"Freshman", "Sophmore", "Junior", "Senior"};
enum Semester {FIRST, SECOND};
const std::string SemesterNames[2] = {"First", "Second"};

// Replace the following comments with the appropriate member definition:
struct Student {
	std::string name;
	std::string studentID;
	Year year;
	Semester semester;
	float gpa;
};

void printStudents(Student *students, int numStudents);
Student *readStudents(std::ifstream &inp, int &numStudents);
void writeStudents(std::ofstream &outp, Student *students, int numStudents);

const int PRINTSTUDENTS = 1;
const int READSTUDENTS = 2;
const int WRITESTUDENTS = 3;
const int EXIT = 4;

int main(int argc, char *argv[]) {
	char fileName[50];
	char dummy[1];
	int numStudents = 0;
	Student *students = NULL;
	int choice = 0;
	do {
		std::cout << "Menu" << std::endl;
		std::cout << PRINTSTUDENTS << ") Print students" << std::endl;
		std::cout << READSTUDENTS << ") Read a new file" << std::endl;
		std::cout << WRITESTUDENTS << ") Write the file" << std::endl;
		std::cout << EXIT << ") EXIT" << std::endl;
		std::cout << "Choose: ";
		std::cin >> choice;
		std::cin.ignore();
		switch (choice) {
				
			case PRINTSTUDENTS:
				
				printStudents(students, numStudents);
				break;
				
			case READSTUDENTS:
				
				std::cout << "Please enter a file name: ";
				std::cin.getline(fileName, 50);
			{
				
				std::ifstream inp(fileName);
				if (!inp) {

					std::cerr << "Cannot open student file" << std::endl;
					
				}
				// Put code here to …
Arkinder 93 Posting Pro in Training

Yes, the Opera Mini Browser.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

background: url('images/footer.jpg') no-repeat; Note the single quotes.

Make sure that you're using the correct file path, then try giving it a set width and height. If it's still not appearing, then another element is affecting it.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

The .html file extension is just a renamed text (.txt) file containing HTML markup.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

If it's happening in IE6 and IE7 then it's the browser, not your CSS. IE6, and IE7, has several properties that only exist in that respective browser. The lynching of IE6 is long over due. It cannot ever truly be out of quirks mode and shouldn't be supported by designers anymore.

As for IE7 I can't really say for sure what's causing it without seeing your CSS. I don't have to time to list what I think it may be with decent explanations today - sorry.

That's easy enough, but are you wanting the menu to sit next to the logo or on top of it?

To sit next to it simply float both elements to the left and give each a set width that doesn't exceed the container - this includes margin and padding. Don't forget a clear: left; on the next element.

To sit on top of it, give the menu's container (presumably the same container of the logo) a position: relative; . Then use position: absolute; and right: 0; on the menu.

Once again, sorry for the lacking reply. I'm currently working on a project that's consuming most of my time.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Hey Toby,

Awesome, I'm glad that you got it all working finally. Sure. In theory, as long as the check box and numeric stepper are inline elements they will sit next to each other in the form.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Make sure that you are using a doctype and that your HTML and CSS are valid.

As drjohn suggested, reset the margin and padding for every element. Except, instead of using a body selector, try a universal rule just to avoid any possible inheritance issues.

* { margin: 0; padding: 0;}

There are several things that could cause this, but I'll wait until you post your markup and CSS.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Alright, then you'll just have to become more familiar with CSS so you can figure out how to edit it on your own. Without access to the page all I can do is guess, which is very ineffective.

Some tutorials: HTML Dog, Mozilla Developer Network, Google Code University

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Thank you for the screen shots, they make my life so much easier. One thing you could try.

<div id="profile_info"><!-- the container for the page -->
<div id="profile_info_container">
<!-- the container for the content; it will have the border shown in your screen shots, and it will have the width that displays both pages -->

    <div id="pic_left_page">
    <!-- will hold the content of the left page. A set width will prevent the issue in your first screen shot -->
    </div>

    <div id="pic_right_page">
    <!-- will hold the content for the right page -->
    </div>

</div>
</div>

If the layout makes sense then the CSS shouldn't be a problem for you. If you're still having an issue, or don't want to edit your markup. Message me a test user account.

Regards
Arkinder

Arkinder 93 Posting Pro in Training
.nav {
    position: relative;
}
.profile {
    position: absolute;
    width: 2000px;
}

position: absolute; will remove the element from the normal flow of the page and move to the top-left edge of the document. The position: relative; makes it begin at the top-left edge of that element instead of the document. Now you should be able to freely adjust the width of either element respectively.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Post your HTML please.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

If .profile is a child of the division then it's going to have the same width because you haven't set any widths, unless .profile in an inline element (I'm assuming not since you're using text-align: center; )

So once again, assuming:

div {
    background: 0 10px url(bkcontentwrap.png) repeat-y;
    background-size: 800px auto;
    overflow: hidden;
    position: relative;
}
.profile {
    text-align: center;
    position: absolute;
    width: 2000px;
}

Regards
Arkinder

Arkinder 93 Posting Pro in Training
#nav-outer {
    background-image: url("/images/headerbg.png");
    height: 110px;
    padding-top: 11px;
    position: relative;
    top: 24px;
}

The top property is pushing the header down. Firefox is the official browser of the W3C, and is such because it displays HTML and CSS more correctly than any other browser. So what I find odd is that the top property isn't working in your Chrome. Make sure to validate your HTML and CSS.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Multiple audio elements display and work correctly for me. Check your attributes for missing quotations, and that you are correctly closing each tag.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Could you post a link to a test site or the markup and CSS that you have already tried? There are several ways to do this, but I would rather not list them all if they aren't relavent to what you're doing.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

This cannot be done with HTML or CSS. Try PHP.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Make sure that the combined widths aren't exceeding their container, then check the margin and padding.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Sorry, I meant to mention that but forgot. :P

It sounds like the width is just exceeding the width of the grid. Make sure to give each box the 130px width and height, and then check to see if any margin and padding is pushing the content a little too much.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

It might be possible with psuedo-classes, but you would have to be very careful about where you place each element - more trouble that it's worth.

jQuery is a JavaScript library that allows you to do things like this with very little code - 4-8 lines. So I definitely recommend going with that.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

No worries, for some reason I'm not receiving any e-mail notifications either. It's nice to see how everything is coming together. :)

Try increasing the height of the container with the white background.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Give the non-background divisions a higher z-index.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Sorry, I must have misunderstood you. You're wanting to use several divisions, each with its own background image, to make one background image? That's definitely doable.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

As far as designing one for yourself goes, Xcode is a must. However, it requires a some what in-depth knowledge of how Lion deals with data. The only think I've ever used Xcode for is compiling my C/C++.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

No, you cannot use multiple background images on one element.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

No problem, and Ips is correct. Although clear: left; would be a little more practical since there aren't any elements being floated to the right.

Regards
Arkinder

Arkinder 93 Posting Pro in Training
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">

h3 { display: inline;}  /* removes space before and after the heading elements */

.column {
	width: 278px;
	float: left;  /* places divisions on the same line */
}

.space { margin-left: 66px;}

</style>
</head>

<body>
<div>

<h3>Welcome</h3><br>
<div class="column">Ensure you are not spamming, plugging or linking to your product, service or website anywhere within your post.</div>
<div class="column space">Ensure you are not spamming, plugging or linking to your product, service or website anywhere within your post.</div>

</div>
</body>
</html>

Paragraphs and heading elements insert a new line both before, and after, the element. To remove this, use the display property the way I did above.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

JavaScript can do it. Ask over there.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Use jQuery.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

No worries, if anything it's just annoying that you keep getting different results when it has to be something simple. lol

To post a screen shot, use the advanced editor and click on the paper clip icon. If I'm able to see what you're seeing that would make this a lot easier.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

I'm seeing the same navigation bar. Have you cleared your browser's cache?

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Okay, the problem is simple. The position: absolute; and left: -999em; are being inherited by each child ul . So on the 3rd drop down you're only setting one left: -999em to auto , out of three.

While I can fix that, it creates a new problem. There just isn't a way to write a CSS selector with a pseudo-class that will work on that third ul . Firefox, Chrome, and Safari are all working correctly. Earlier versions of Safari and any version of Opera round down to the nearest unit when using decimal places (12.8em = 12em - not the actual problem but just in case you weren't aware).

You'll just have to make the navigation another way. Lists really aren't even needed for navigation bars.

Regards
Arkinder

Arkinder 93 Posting Pro in Training

The footer isn't being pushed anywhere, it's just not big enough to be seen. Give it a set height in px or em.

#footer {
    background: none repeat scroll 0 0 #4D3821;
    clear: both;
   height: 100px;
    margin: 0;
    padding: 0;
}

I'm not sure that I understand you. You want the check box next to the name, image, ?

Regards
Arkinder

iamthwee commented: Liking your replies...Keep it up. +15
Arkinder 93 Posting Pro in Training

You aren't wasting my time at all. Post your original page. Something has to be different some where. :)

Regards
Arkinder

Arkinder 93 Posting Pro in Training

Okay, try using the same document that I am just to check for any errors that you may have.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<style type="text/css">
		
		/* ~~ this is the Shopping Cart page styles ~~ */
#customOrder {
	float: left;
	width: 350px;

}

#customOrder p {
	color: #8DADAF;
	float: left;
	margin-left: 20px;
	padding-top: 0;
	text-align:left
}

#customOrder h1 {
	color: #8DADAF;
	font-family: "Times New Roman", Times, serif;
	font-size: 25px;
	font-style: normal;
	font-weight: bold;
	margin-left: 20px;
	margin-top: 20px;
	text-align: left;
}

#grid{
	background: #ffffff;
	border: 1px solid #600;
	float: right;
	height: 520px;
	margin-top: 20px;
	margin-bottom: 20px;
	margin-right: 20px;
	width: 520px;
	position: relative;
}

#grid #cartContent {
	
}


#grid #cartContent h3 {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	font-weight: normal;
	color: #AD9F91;	
	padding-top: 5px;
}

#grid #cartContent h4 {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	font-weight: normal;
	color: #5B3F24;	
	padding: 7px;
}
	
#grid #cartContent img {
	padding-left: 20px;
}

#frmCartButtons {
	margin-top: 20px;
	height: 30px;
	width: 300px;
	margin-bottom: 20px;
	position: absolute;
	top: 100%;
}

/* ~~ this is the footer style ~~ */
#footer {
	background: #4d3821;
	clear: both;
	margin: 0px;
	padding: 0px;
}

#footer #footerLeft {
	float:left;
	width: 200px;/* ~~ this is width of the left-footer~~ */
}

#footer #footerLeft p {/* ~~ this targets the p inside the left-footer~~ */
	color: #FFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: small;
	font-size: 11px;
	line-height: 1em;/* ~~ indicates line height between lines. A number value is used as a m32ultiplier in …