I have some text abd arround it there's two small images of "qoutes" (see attached file).
The first image containt only simple "img src" tags but the second one contain "align" tag as well. look like that:
<img align="top" src=http://www.webdeveloper.com/forum/archive/index.php/"qoute2.jpg" width="45" height="38" alt="" />
The problem is that I can't validate my page because of that "align=top" tag (that's my last error). I need to add it to my CSS but I have no idea how to replace that tag. What CSS I should use?
Thanks!Give your second image an ID, of say "endQuote" and use that to reference the image in CSS:
#endQuote { vertical-align: top; }
OR
#endQuote { vertical-align: text-top; }class?
Thanks a lot!An ID is only meant to be used once. Basically it's most usefull as a que to the designer or site maintainer that the styles are only used once on the page and are unique. If you need to reuse a style, create it as a class instead.Does it really matter and why?Technically yes, but realistically - right now - no.
Browsers will reuse an ID over and over again just like it was a class. But there could be a point in the future when IDs will be used once and only once. So if you want to reuse a block of styles, place it in a class. If you only want to use it once, place it in an ID.
The point of an ID is to denote that a group of styles are unique on a page. For example, the left column in my style sheet layouts are always given an id of #left. If browsers actually paid attention to the fact that its an ID, someone later on - after I'm not maintaining the site anymore - couldn't assign that ID to some other page element and possibly screw up the layout.
For that reason it can matter. If you want to place everything in a class, go for it. That doesn't really hurt anything. But people might get the wrong idea that they can use the class for whatever. It's totally up to you.So you're saying that it'll be better that at least I'll switch my menu CLASS to ID right?
Thanks a lot man!Yes. But it's not critical. If you're still in the development phase of your site and you don't many content pages to deal with, then it would be best. If nothing else, an ID tells you as a developer/designer that it represents a group of styles used only once on the page. It's a design que both in the HTML file and the CSS file. To me, an ID represents a unique page element and a class represents a repeating page element, just as IDs and classes were meant to be interpreted as.
But again, it's up to you.thank you.
The first image containt only simple "img src" tags but the second one contain "align" tag as well. look like that:
<img align="top" src=http://www.webdeveloper.com/forum/archive/index.php/"qoute2.jpg" width="45" height="38" alt="" />
The problem is that I can't validate my page because of that "align=top" tag (that's my last error). I need to add it to my CSS but I have no idea how to replace that tag. What CSS I should use?
Thanks!Give your second image an ID, of say "endQuote" and use that to reference the image in CSS:
#endQuote { vertical-align: top; }
OR
#endQuote { vertical-align: text-top; }class?
Thanks a lot!An ID is only meant to be used once. Basically it's most usefull as a que to the designer or site maintainer that the styles are only used once on the page and are unique. If you need to reuse a style, create it as a class instead.Does it really matter and why?Technically yes, but realistically - right now - no.
Browsers will reuse an ID over and over again just like it was a class. But there could be a point in the future when IDs will be used once and only once. So if you want to reuse a block of styles, place it in a class. If you only want to use it once, place it in an ID.
The point of an ID is to denote that a group of styles are unique on a page. For example, the left column in my style sheet layouts are always given an id of #left. If browsers actually paid attention to the fact that its an ID, someone later on - after I'm not maintaining the site anymore - couldn't assign that ID to some other page element and possibly screw up the layout.
For that reason it can matter. If you want to place everything in a class, go for it. That doesn't really hurt anything. But people might get the wrong idea that they can use the class for whatever. It's totally up to you.So you're saying that it'll be better that at least I'll switch my menu CLASS to ID right?
Thanks a lot man!Yes. But it's not critical. If you're still in the development phase of your site and you don't many content pages to deal with, then it would be best. If nothing else, an ID tells you as a developer/designer that it represents a group of styles used only once on the page. It's a design que both in the HTML file and the CSS file. To me, an ID represents a unique page element and a class represents a repeating page element, just as IDs and classes were meant to be interpreted as.
But again, it's up to you.thank you.