The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.
If you want to adhere to any standards whatsoever AND YOU SHOULD BE:
a) the border element was depreceated in HTML4 and b) things should always be in quotes.
So you want:
<a href="blargh" title="View fullsize image or see something else">
<img src="blargh" width="320" height="240" alt="describe the image here" style="border: 0;" />
</a>
(I've split things out a bit so it's easier to understand..)
Start learning the right way to do things and you won't develop bad habits.
Alternatively, what I always do is at the top of stylesheets set:
img {
border: 0;
}
And then explicitly set when I want a border. Saves having to put the style="border: 0" on every image that is also a link.
SporkAndrew on
The one about the fucking space hairdresser and the cowboy. He's got a tinfoil pal and a pedal bin
If you want to adhere to any standards whatsoever AND YOU SHOULD BE:
a) the border element was depreceated in HTML4 and b) things should always be in quotes.
So you want:
<a href="blargh" title="View fullsize image or see something else">
<img src="blargh" width="320" height="240" alt="describe the image here" style="border: 0;" />
</a>
(I've split things out a bit so it's easier to understand..)
Start learning the right way to do things and you won't develop bad habits.
Alternatively, what I always do is at the top of stylesheets set:
img {
border: 0;
}
And then explicitly set when I want a border. Saves having to put the style="border: 0" on every image that is also a link.
Also, you'll probably want to stick the style code in an external CSS file. Apply that sucker to all your pages, and suddenly you can make sitewide style changes all at once.
As far as I know border: 0 and border: none both give the same results and are both CSS2 compliant. I just use border: 0 because it's 3 characters less.
SporkAndrew on
The one about the fucking space hairdresser and the cowboy. He's got a tinfoil pal and a pedal bin
I just want to thank you guys for helping people learn efficient and standard adherent code (seriously, no sarcasm).
I can't stand seeing some of the code here at work (SQL, ASP, XHTML, XML). You would not believe the amount of bloat and waste and lack of comments. Why don't people use comments‽
Anyways, sorry to derail but I wanted to commend learning it the right way the first time.
Also, on the off chance that you only want to shut off borders for images that are inside of links:
A IMG{
border: none;
}
In general it's not such a great idea using the style attribute directly on the tag. By doing so you're effectively tying the presentation to the content, which is basically what css is supposed to prevent.
I was giving him a quick thing to fix the immediate problem, I was working on the assumption that if the OP didn't care to Google the fix, he wasn't too fussed about reading CSS
But yeah, classes are much better than style attributes.
Posts
I always forget. I think it's the latter. Try that one first.
just add border=0 inside the img tags.
Or the <a> tag.
again, I forget which.
try either <a href="yourlink" border=0><img src="yourimage"></a>
or
try this one <a href="yourlink><img src="yourimage" border=0></a>
one should work
i forget which.
Thanks guy.
Oh dear God nooooooo!
If you want to adhere to any standards whatsoever AND YOU SHOULD BE:
a) the border element was depreceated in HTML4 and b) things should always be in quotes.
So you want:
(I've split things out a bit so it's easier to understand..)
Start learning the right way to do things and you won't develop bad habits.
Alternatively, what I always do is at the top of stylesheets set:
And then explicitly set when I want a border. Saves having to put the style="border: 0" on every image that is also a link.
Also, you'll probably want to stick the style code in an external CSS file. Apply that sucker to all your pages, and suddenly you can make sitewide style changes all at once.
It should be style="border:none;" though.
As far as I know border: 0 and border: none both give the same results and are both CSS2 compliant. I just use border: 0 because it's 3 characters less.
If you put border:none; no border is drawn.
Doubt it matters much, especially with modern browsers behaving (a little bit) better.
I can't stand seeing some of the code here at work (SQL, ASP, XHTML, XML). You would not believe the amount of bloat and waste and lack of comments. Why don't people use comments‽
Anyways, sorry to derail but I wanted to commend learning it the right way the first time.
In general it's not such a great idea using the style attribute directly on the tag. By doing so you're effectively tying the presentation to the content, which is basically what css is supposed to prevent.
But yeah, classes are much better than style attributes.
border=0 works.