Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 ViewsHello, l have an image on my webpage l would like to align to center, here is the code:
<img border="1" src="Header1.jpg" align="middle" width="1000" height="150"/>
It will not align to the center but, have l done something wrong???
At 6/5/09 07:23 PM, 15DAVE15 wrote: align="middle"
Will not do anything. Learn about the align attribute and its values. The image has to be in a container be that a div or even the body of the document. You could then center it using CSS and setting the margin appropriatly.
Google CSS centring using margin or something. In fact googling how to centre content would give you and answer. So don't ask a simple question like this again, google it! Read the programming forum rules after you read this!
At 6/5/09 07:36 PM, Jon-86 wrote: Google CSS centering using margin or something. In fact googling how to center content would give you and answer.
Or you could let him do what he's trying to do, damn css junkie.
align="left"
align="right"
align="center"
Those all work
At 6/5/09 10:03 PM, Super-Yombario wrote: align="left"
align="right"
align="center"
Those all work
Align is deprecated. Use CSS.
Yea l have read the forum rules and l have searched google, that is how l got the current code l am using...
l can get it to align left and right but not center...
At 6/5/09 10:03 PM, Super-Yombario wrote: Or you could let him do what he's trying to do, damn css junkie.
Just because you suck at it or don't get it doesn't mean that it is the best solution 99% of the time.
I LOVE CSS, I use it all the time. The website I am making would never remotely look nice without CSS. But he asked how to align it to the center WITH THE ALIGN ATTRIBUTE. He never mentioned CSS. I hate how this forum shoves CSS down the throat of every beginner who asks a question about attributes.
At 6/8/09 03:42 PM, Super-Yombario wrote: I hate how this forum shoves CSS down the throat of every beginner who asks a question about attributes.
He said:
"l would like to align to center, here is the code:"
and
"It will not align to the center but, have l done something wrong???"
He never specified anything other than "what am I doing wrong" if your looking for help and you don't know the answer. Dose it matter what answer you get as long as it works for you? I could jave just as easily said centre the image using a table. But I didn't..! Nothing was shoved down the persons throat. Its not as if I got a CSS book and said swallow that ya bas! CSS isn't even that hard to start doing even for a complete beginner.
At 6/8/09 03:42 PM, Super-Yombario wrote: I LOVE CSS, I use it all the time. The website I am making would never remotely look nice without CSS. But he asked how to align it to the center WITH THE ALIGN ATTRIBUTE. He never mentioned CSS. I hate how this forum shoves CSS down the throat of every beginner who asks a question about attributes.
so we should continue to explain/teach old and deprecated methods of design, without any mention of the right way to do it?
He asked what he was doing wrong with the align attribute. I'm not saying it's okay to always use deprecated attributes, but he just asked about how to align the image to the center and he was already using the proper tag, he just incorrectly filled the attribute.
He didn't know what he was doing wrong! He didn't know it was the attribute. If he knew what was wrong he would have fixed it himself.
At 6/8/09 03:42 PM, Super-Yombario wrote: The website I am making would never remotely look nice without CSS. But he asked how to align it to the center WITH THE ALIGN ATTRIBUTE. He never mentioned CSS. I hate how this forum shoves CSS down the throat of every beginner who asks a question about attributes.
1.) CSS is the new standard pretty much. It's not difficult, and people should start using it.
2.) Your site looks like garbage. The background image is horrible, the layout's terrible, etc.
3.) What Dearon said.
At 6/8/09 08:08 PM, TheRyoku wrote: 1.) CSS is the new standard pretty much. It's not difficult, and people should start using it.
2.) Your site looks like garbage. The background image is horrible, the layout's terrible, etc.
3.) What Dearon said.
And on top of that, the html and the css both have problems.
At 6/9/09 06:53 AM, DearonElensar wrote: And on top of that, the html and the css both have problems.
And I absolutely LOVE the whole "your internet browser is not supported by this website" thing that comes up at the top when you use IE 7, which means that you're putting at least 80% of internet users out in the cold. I suggest you start supporting IE but I also suggest fixing your own website first before giving people advice on how to fix their HTML and CSS.
At 6/9/09 07:40 AM, Jessii wrote:
And I absolutely LOVE the whole "your internet browser is not supported by this website" thing that comes up at the top when you use IE 7, which means that you're putting at least 80% of internet users out in the cold. I suggest you start supporting IE but I also suggest fixing your own website first before giving people advice on how to fix their HTML and CSS.
25% of the internet use any IE version, so you know
At 6/9/09 06:53 AM, DearonElensar wrote: And on top of that, the html and the css both have problems.
I don't know how to fix the CSS error, so I'll just keep it there. And the invalid HTML is because of the links. Apparently you can't have anything like &, =, or ? in your links. Maybe that's my bad. But just because I don't know how to make my code perfect doesn't mean I don't know what it does. So I daree you to find anything in my source that I can't explain, huh?
At 6/9/09 05:46 PM, Super-Yombario wrote: 25% of the internet use any IE version, so you know
where did you get that statistic from? According to my google analytics report, 65% of my traffic uses IE
I don't know how to fix the CSS error, so I'll just keep it there. And the invalid HTML is because of the links. Apparently you can't have anything like &, =, or ? in your links. Maybe that's my bad. But just because I don't know how to make my code perfect doesn't mean I don't know what it does. So I daree you to find anything in my source that I can't explain, huh?
& must be written as & because '&' is the character that signifies an escaped html entity.
Oh, okay, I'll change that now then :P
A quick Ctrl+F
But aside from that, I got my statistics from w3schools.com, and according to them, 40% use any IE, and 21% use IE7
At 6/9/09 09:54 PM, Super-Yombario wrote: But aside from that, I got my statistics from w3schools.com, and according to them, 40% use any IE, and 21% use IE7
So how did you come to the 25% total?
At 6/9/09 09:54 PM, Super-Yombario wrote: Oh, okay, I'll change that now then :P
A quick Ctrl+F
But aside from that, I got my statistics from w3schools.com, and according to them, 40% use any IE, and 21% use IE7
Market share put's it at 70%, The Counter at 75%, One Stat at 80%, Statcounter at 65% and Adtech at 66%.
So even if they all overestimate it you still have way more than 25% of even 40% and most of the general users use IE.
If this has to go from answering his question without disrupting his learning to why my website doesn't support IE, I'm out.
At 6/10/09 10:25 AM, Super-Yombario wrote: If this has to go from answering his question without disrupting his learning to why my website doesn't support IE, I'm out.
You were the one who advised on faulty, deprecated HTML and when we said the original poster should use CSS you felt the need to bitch about it, so it's pretty much your own fault for starting this.
At 6/9/09 09:54 PM, Super-Yombario wrote: But aside from that, I got my statistics from w3schools.com, and according to them, 40% use any IE, and 21% use IE7
You can't use W3Schools as an accurate portrayal of Internet Explorer users. Think of the W3Schools userbase. More often than not it's people who know a thing or two about web-development. People often smarter than your average Internet user. Therefore people who know that Firefox/Opera/Chrome/Safari are better alternatives.
At 6/9/09 09:54 PM, Super-Yombario wrote: Oh, okay, I'll change that now then :P
A quick Ctrl+F
But aside from that, I got my statistics from w3schools.com, and according to them, 40% use any IE, and 21% use IE7
Yes these are the statistics, but what you don't realise is that you can't rely on them! Web developers should ALWAYS be looking for maximum compatibility.
If you NEED a feature not available in Internet Explorer then you should always provide an alternative of some kind, or a least an apology, and how you wish you could be more awesome by making it compatible. You can't just shun people from your site based on your own personal preference.
And you may like to quote W3 but I don't think you ACTUALLY read the page.
Statistics Are Often Misleading
You cannot - as a web developer - rely only on statistics. Statistics can often be misleading.
Scroll down next time.
At 6/9/09 05:46 PM, Super-Yombario wrote: I don't know how to fix the CSS error, so I'll just keep it there.
What do you mean? It says
157 #light2 Property opacity doesn't exist in CSS level 2.1 but exists in [css3] : 0.7
. Either start using CSS3 (if it's available yet) or just remove the part thats causing the error. It even tells you what line its on.
Here is the code <div style="text-align: center;"><IMG SRC="image.gif" ALT="image"></div>. This will definitely work.
At 6/17/09 04:55 AM, nyboywonder wrote: Here is the code <div style="text-align: center;"><IMG SRC="image.gif" ALT="image"></div>. This will definitely work.
Wow, lets take a look at what's wrong with this:
Inline CSS, capital HTML tags, not closing the image. It's also highly inefficient and unnecessarily bloated.
5 errors in about 70 characters, that's a new record?
At 6/17/09 10:42 AM, smulse wrote:At 6/17/09 04:55 AM, nyboywonder wrote: Here is the code <div style="text-align: center;"><IMG SRC="image.gif" ALT="image"></div>. This will definitely work.Wow, lets take a look at what's wrong with this:
Inline CSS, capital HTML tags, not closing the image. It's also highly inefficient and unnecessarily bloated.
5 errors in about 70 characters, that's a new record?
With inline CSS though, do you consider it necessary to define a new CSS entry (if you're only using one line of CSS?) Such as this:
<div style="margin: 0 auto;"><img src="images/myImage.png" /></div>
Even though you might reuse the above a lot, but think of it as you might not reuse it, so then would creating an entry be more time consuming?
At 6/17/09 12:56 PM, blah569 wrote: With inline CSS though, do you consider it necessary to define a new CSS entry (if you're only using one line of CSS?) Such as this:
<div style="margin: 0 auto;"><img src="images/myImage.png" /></div>
Even though you might reuse the above a lot, but think of it as you might not reuse it, so then would creating an entry be more time consuming?
I guess it depends entirely on the context you're using it in. If you want all images centred, or you're going to use it cross-pages you might as well add in a style. But, it's not like the CSS would be much weight.