638
(after months of inactivity, my first post is to secure our 2nd win :D)
Hi naveen! =)
welcome to daniweb. I hope you stay here and have fun, and not just with the IT topics.. there are also good forums or posting games. Besides, I'd really love to see someone who's not a programming or computer major here. I'm feeling a bit left out myself (I'm in my last year as a chemical engineering student).
Try the following,
1. Since you want the 'username' to be numbers, then your data type should be numeric or integers too, just like the id column.
in the Simple PHP login:
Create a database (mysqladmin)
Name the table "dbUsers." It will need 4 fields:
Name Type Addition
id int(10) Primary Key, AUTO_INCREMENT
username int(10) Unique
password char(16)
email varchar(25)
---------------
That's it, actually. Although I have to wonder why you're not using the 'id' column to identify the users instead if you're going to use numbers anyway.
Maybe this is a good point for assuming that women take LONGER to get over a relationship than men. Which is why we would still care about our ex-partners.
We're more 'constant' and loyal creatures. (I'd like to think) =P
One wonders how it manages to clock up 100 million hits a year, to be frank.
It's the appeal of the lifetime servitude. Trust me. =P
@deepcut
But if that hard-disk belongs to the US government, I'd say that my house is worth infinitesimally less than the hard disk.
Besides, for people who base their lives on a computer (like most of the people in this forum), hackers are as much of a problem as housebreakers. Wouldn't you agree?
I hope that prison doesn't rely on computers for its daily 'administrative' needs. Otherwise...
(Surprisingly) I don't enjoy reading about 'tech-based' companies failing (not even Microsoft), specially since we are a community who make our living through technology. This news isn't too good, I almost wish I didn't read it... *goes to brainwashing clinic*
I still appreciate the blogger for increasing my awareness though.
Why would I (or anyone in this forum) do that...?
We already have a couple of working pcs (and laptops) and lots of open source software for almost all our needs...
Maybe MS's target for this are the consumers who are just starting out with their 'pc experience'.
Perhaps you're right. It may be an early April 1st joke...
Sex probably didn't make it because it's too short (the word)...
I haven't encountered someone with an 'easy' password. My friends could be security freaks...
*hungs head in shame*
I couldn't search for a proper definition (triplification) either... it seems that it has something to do with 'growth' of data? Spread of data...? No...? *eats sandwich in silence*
Wow... well aspergers or not I'm still intimidated.
But I read somewhere that those who can memorize a lot of things lose the ability to attach emotions to memories... meaning they might be able to memorize all the movies by a certain producer but if you ask them what they think was the best one, they won't be able to answer...
Is there an essay portion in that professional exam...?
I agree with you on this one... the internet is really good for finding quick answers but from experience, e-magazines don't get my full attention because (most likely) I have 8 other tabs (and 8 other tasks) open while reading the digital format.
I still relish being able to 'laze around' in a couch and read something without getting the urge to check if the next 'page' has finished loading.
What do you mean by dynamically alternate row colours? Are you generating the html for the rows dynamically? If so, you'll have to dynamically indicate the class of the rows too. Example, in your css:
.row1 {background-color: black};
.row2 {background-color: white};
Then in the script used to dynamically create the table, alternate between printing the row1 and row2 class:
foreach (rowelement) {
if ($rowname = 'row1') $rowname = 'row2';
else $rowname = 'row1';
print "<tr class=$rowname>";
}
Maybe you want to work with pseudo-classes? But I think they have a sketchy implementation in IE6-7 or lower. Anyway, the only pseudo-class I've seen that might apply is the first-child pseudoclass. And there's no second-child pseudoclass. =(
maybe you can use javascript and detect the 2nd element of the array containing the list items... but that's too complicated.
How are you implementing the dynamic generation? Perhaps there's a way to mark item2 before the html code is generated.
CJ,
Floats are pretty rubbish for aligning numeric data.
float:left
aligns the most significant digit whilefloat:right
aligns the least significant digit (which may or may not be to the right of the decimal point). The human eye likes alignment of the units column.Airshow
He isn't looking for a way to place significant digits (or at least, he didn't say it in his post). Just a way to align the divs properly. He used the odd-even numbering to show that each row should have 2 divs, and that the 'odd' numbered divs (or the first ones in the row) should align to the left, while the even numbered divs should sit next to the odd divs. And that no extra 'third' div should share their row. =)
When you 'float' an element, it's like you're taking it on a higher plane. (think of the page as the airport and the floated div an... err... flying airplane)
Since the elements contained by the main div are all floated, the main div, in effect, has no 'content'. So all you see is its borders (the small band at the top).
The overflow: auto
is a good solution... provided the 'overflowed' div doesn't span 100% of the page width.
If your overflowed div has 100% width, and the page exceeds one 'page length', the scrollbar that appears on the right causes the div have a less than 100% displaying area. So some browsers will display a horizontal scrollbar. Which is ugly. =(
I've had to reduce the width of my main container divs due to that problem.
And I'm still waiting for the table-cell, table-row, etc.
values for the display property to be supported by all browsers.
cj, have you tried adding a clear: right
property to the even numbered divs? and clear: both
for the xxx.
Hi Vishal. =)
There isn't much of a trick there. The main content of the page is a table with no background. The background image was used on the body (CSS for that below). The 'translucent' effect of the image was made using the image editor itself. Probably a logo, set at 70% opacity on the same background color as the page to be used.
Here's the background image they used:
http://www.iplt20.com/assets/images/bg-dd.jpg
Here is an approximation of the html and css code for it:
<html><head><title>MEEP</title>
<style type="text/css">
<!--
body {
background-color: #18335E;
background-image: url('http://www.iplt20.com/assets/images/bg-dd.jpg);[B]
background-position: right;
background-repeat: no-repeat;
background-attachment: fixed;[/B]
}
-->
</style></head>
<body>
<table>
<tr><td>Some content</td></tr>
<tr><td>Another row</td></tr>
</table>
</body>
</html>
As you can see, all the 'trick' is done by manipulating the body's properties in CSS. =)
The first two background properties aren't important, they just refer to the background color and location of the background image to be used. But it works this way: if your background image does not cover the whole part of the page, the background color fills up the rest of the page's background.
The next properties are the trick part.
The CSS is pretty self-explanatory in that setting background-position: right
means that you're positioning the background-image on the right part of the page. You can change that using a combination of top/bottom and left/right. (For example, you can have background-position: top left;
or background-position: bottom right;
but certainly not top bottom! …
You're welcome. Hope you find it useful. =)
Doesn't this allow other items (such as text) to flow on the left side?
Thank you for the reply. =)
Yes, it doesn't "clear" the left side, allowing elements to float beside it. But it doesn't always clear the right side either. =(
So I'm wondering what it's for, since it doesn't clear the right side the same way clear: left
works for the left.
ream
mead
mar
daniweb
I'm not exactly the best student but I've exerted more effort (than usual) in studying how divs behave and I am more comfortable (efficient) working with divs than with tables.
Even if I didn't have that advantage and it's easy to construct a page from scratch (from tables), trying to change the design or structure of a site based on tables is like college without coffee and pizza. Pure hell.
The table's boon (easy to command/ 'bend to your will') is also it's bane:
It's easier to manipulate because there isn't anything much to manipulate. You just tell it to hold some columns, rows, have a background, have paddings, borders, and margins. Be a certain height or width.
Everything is fixed.
Whereas, divs are so much more flexible. Can you imagine what wordpress would be like if it used tables to display its content? Will there be that much diversity to the designs and structures available to us? Can we switch the positions of the body, menu, and other parts of the page with just one CSS file if designs were based on tables?
Maybe. But it won't be that easy. Something about switching the actual contents of each column/row/cell. (I suspect this is the reason why Wordpress is more popular than Joomla)
It takes an average of four times as long to create a page using divs and css, compared to using tables and css. This is because the page author must …
You're most welcome. =)
(I'm still hoping someone will clear up the issue with clear: right
though)
blue
lube
ebb
let's try for longer words, eh?
occupation
"If there's a will, there's a won't!" - Golden rules of parenting
ken
then
keen
international
AJAX isn't a new language, it's just based on javascript (but it somehow 'interacts' with the server because it can 'call' pages). So with what you want to do, the benefits of AJAX isn't very obvious. However, it's very useful to learn because of that being-able-to-call-pages functionality (and some really cool animation effects).
(So you won't curse the day I was born when you get stuck trying to learn it.)
Usually when a user clicks on a link or on a "submit" button, the whole page is "submitted" and a new page is loaded (HTML/PHP/ some other page).
Assuming you couldn't do it with an iframe, you can use AJAX to get the value of the link (or to just react if a certain link is clicked) and do something based on that action (link-clicking) which can be one of the ff:
- animate something
- call some php/html/.something page and get the value it returns
If you're already familiar with javascript, you can just read the uses or view some samples of AJAX in action:
- a bit of a serious article about AJAX
- a cool/easy-to-understand article demonstrating AJAX uses for designers - the page for the jQuery demos can be found here
jQuery is an AJAX library (just a .js file you include in your pages, like an external CSS file that allows you to start using AJAX …
Thank God IE is a browser, not a whole computer.
(Me, On a Pissed-Off Feb. 21, 2009)
Hell on the knees...
Staying awake for more than 24 hours?
go do dog...
firebug
If you're really in a hurry and are willing to deal with a horde of angry, standards-wielding html-ers, you can look up this iframe article randomly Googled by yours truly.
But if you have more time, you can read about AJAX and PHP and 'dynamically' load certain pages or content into a portion/element of your index page.
I was going to be a pompous ass and point you to the W3C site... but it's written in Martian so I'll try to humanize it here. =)
clear: both
If you have a couple of floated elements, say div1, div2, and div3, their arrangement will depend on how much content each div has.
For example, if all divs have a simple "Hello world" in them, most likely, the divs will lie horizontally beside each other on a page. Adding a clear
attribute to them specifies that a certain side of that floated div shouldn't have certain floated elements beside it:
#div1, #div2, #div3 {display: block; float: left;}
#div2 {clear: left;}
Instead of the divs lying horizontally, div2 and div3 will now lie in a row below div1. This is because you specified that div2's left side shouldn't have left floated elements beside it.
(In truth, the clear: right
declaration stumps me. So you need to have someone else explain that)
Specifying clear: both
is like saying: I don't want floated elements on BOTH sides of this element. So divs 1, 2, & 3 will lie on different rows altogether.
when it is just margin without left or right
The margin
property is a shorthand for the top, right, bottom, left margin properties. It can take a maximum of four values:
margin: 1.0em 2.0em 3.0em 4.0em;
Is like saying:
margin-top: 1.0em;
margin-right: 2.0em;
margin-bottom: 3.0em;
margin-left: 4.0em;
... but it's shorter. =) The …
If your CSS renders properly in IE, throw a party before you open Firefox.
tick
sick
sic
forum
Haven't tried it.
Singing in the shower?
Like it (if it's someone else's)
Hate it (if it's my error)
Studying foreign languages?
ion
one
less
teal
No. (I'm in pizza-overnight-mode.)
Do you ever get tired of pizza and caffeine?
576 (You can't beat us! *evil laugh*)
-1144
(What's the goal then? =P)
Yes. Very much! *great question*
Do you agree? =P