aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Wondering if the following is standard css Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Wondering if the following is standard css" Watch "Wondering if the following is standard css" New topic
Author

Wondering if the following is standard css

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

I am making a site with joomla, and in the css are the following three elements (elements the right word?):

Can someone here help me understand how these are related? I guess if I could figure out what the .width_medium, .width_fmax, and .width_small methods were for it would be a start. I will look that up and hopefully find the answer myself, but since I started this thread already I will go ahead and post it here too just in case.

edit - also div#wrapper is something I do not understand


True wisdom is in knowing you know nothing - Socrates
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
CSS 101 is what you need: class and id

If you read the selector it says

I want an element that is a body that has a class of XXX and it contains an element that is a div that has an id of YYYY

Depending on what class you put on the body, it changes what gets applied to the div.

Eric
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

Oh so when using this in the html you would use only one of those? That makes sense. I have done the css tutorial on w3school and I have worked with it somewhat, but creating the class and using it in the html is about as far as I have learned. I figured anything after a " . " would be a method (.width_fmax in this case). So that is just part of the class name then right, not a method?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
CSS does not have methods
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

. means class name
# means id


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
christian gibson
Greenhorn

Joined: Mar 14, 2011
Posts: 2
This sounds like my problem as well. I am not a CSS expert and I don't understand the whitespace separating body.width_medium from div#wrapper in the CSS selector. Apparently this is not a case of grouped selectors, because otherwise they would be separated by a comma delimiter? Also I don't understand why the identifier #wrapper is called div#wrapper. w3schools is great, but it doesn't really explain this for us dummies ....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

christian gibson wrote:Apparently this is not a case of grouped selectors ...
Space denotes ancestry. The selector "E F" means all F elements that are children of E elements; for example: "p a" is all anchor tags that are children of p tags.

Also I don't understand why the identifier #wrapper is called div#wrapper.
That means only choose an element with id of wrapper if it is a div. It won;t match an element with that id if it is anything other than a div.
christian gibson
Greenhorn

Joined: Mar 14, 2011
Posts: 2
Hi bearbibeault - thanks for your clear explanation. In the meantime I found this tutorial http://css.maxdesign.com.au/selectutorial/selectors_child.htm which explains so many mysteries
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wondering if the following is standard css