CSS classes are for presentation.
Content is content.
Centering content is presentation.
Class names should not use keywords such as center.
centre is not a keyword and can be used.
The class centre can then be used anywhere centering is desired.
It is quite easy to remember what this class name
Stuart Foulstone wrote:
CSS classes are for presentation.
Content is content.
Centering content is presentation.
Class names should not use keywords such as "center".
"centre" is not a keyword and can be used.
The class "centre" can then be used anywhere centering is desired.
It is quite
Stuart Foulstone wrote:
It is quite easy to remember what this class name does, but if you wish to
use some more obscure name, feel free.
And if, at a later date, you change the CSS for a different layout, you
potentially end up with class names that suggest one thing when they
actually do
CSS classes are for presentation.
Content is content.
Centering content is presentation.
Class names should not use keywords such as center.
centre is not a keyword and can be used.
The class centre can then be used anywhere centering is desired.
It is quite easy to remember what this
On 4 May 2008, at 12:47, Stuart Foulstone wrote:
CSS classes are for presentation.
There is no such thing as a CSS class. CSS is for presentation. HTML
has classes. CSS selectors can match against HTML classes.
Content is content.
True
Centering content is presentation.
True
I suppose it wouldn't matter if you used a class or id, but the id can
be linked to from within the document, so if your page had a table of
contents or something, you could jump from point to point.
Id's have to be unique on the page, so they are perfect for attaching to
the unique sections
Yes, its really easy to add class names as you need them and there is a
level where it seems both logical and usefuul.
Sadly that is not the reality though. Patrick hit the nail in the head
when he mentioned changing designs and having that once relevant class
name end up attaching styles
http://www.w3schools.com/CSS/css_syntax.asp
The class Selector
With the class selector you can define different styles for the same type
of HTML element.
Say that you would like to have two types of paragraphs in your document:
one right-aligned paragraph, and one center-aligned paragraph.
W3Schools is not related to or sanctioned by the W3C.
On Sun, May 4, 2008 at 3:02 PM, Stuart Foulstone [EMAIL PROTECTED]
wrote:
http://www.w3schools.com/CSS/css_syntax.asp
The class Selector
With the class selector you can define different styles for the same type
of HTML element.
Say
On May 4, 2008, at 5:46 PM, Viable Design wrote:
W3Schools is not related to or sanctioned by the W3C.
and enjoys a certain notoriety for sometimes offering less-than-
perfect advice. though when I'm in a hurry I still find it a useful
resource as an aide memoire...
Andrew
Or use a CSS class to do the same,
div class=centre
and
.centre {
text-align: center;
}
On Sat, May 3, 2008 10:22 am, Diego La Monica wrote:
What about div style=text-align: center ?
Diego La Monica
Web 2.0 - Standards - Accessibilità
mobile: +39 3337235382 - skype:
FYI - Adding such a named class, especially with the name center or
center goes against separation of presentation and content.
In a situation where your HTML looks like:
div
div class=centre
my images /
/div
div class=centre
my images /
/div
div class=centre
my images /
/div
/div
You should
@webstandardsgroup.org
Subject: Re: R: [WSG] Alternative to align = center?
Or use a CSS class to do the same,
div class=centre
and
.centre {
text-align: center;
}
On Sat, May 3, 2008 10:22 am, Diego La Monica wrote:
What about div style=text-align: center ?
Diego La Monica
@webstandardsgroup.org
Subject: Re: R: [WSG] Alternative to align = center?
Or use a CSS class to do the same,
div class=centre
and
.centre {
text-align: center;
}
On Sat, May 3, 2008 10:22 am, Diego La Monica wrote:
What about div style=text-align: center
On 3 May 2008, at 20:30, Essential eBiz Solutions Ltd wrote:
There is the old faithful
p aligncentreImage/p
Which as far as I'm aware is valid in XHTML strict
It isn't.
http://dorward.me.uk/www/centre/ explains how to centre various things
with CSS. Images are inline, so text-align on the
Can you explain to me a little bit more of the theory of why you would
want to use and id vs a class called center is this type of situation.
Trying to understand more how this becomes an issue of separating
presentation and content.
Thanks
Michael Horowitz
Your Computer Consultant
How is using a name which is descriptive and easy to remember and
understand (like for those coming in after you've written the code)
going against that separation? It's not actually putting the styling in
the html and if anything it saves coding. If you have a class of center
then you can
17 matches
Mail list logo