Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 08-10-07
Registered User
 
Join Date: Jun 2007
Posts: 270
Thanks: 0
Thanked 0 Times in 0 Posts
MortimerJazz is an unknown quantity at this point
  Using <span> within a class

I'm using Joomla to construct a site.

The following CSS is placed within a table cell with a class name of "contentheading"

span.frontpage {
display: block;
background: #FCF0C8;
font-size: 12px;
padding: 10px;
margin-bottom: 10px;
color: #333;
border: 1px solid #ddb;
}

How do I need to change the code to enable it to work within the class of "contentheading"

I've tried

span contentheading.frontpage{

}

but without luck.

Could anybody help me? I've tried searching for the answer and it's getting me frustrated now.

Thanks alot in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-10-07
Registered User
 
Join Date: Nov 2003
Location: London
Posts: 524
Thanks: 0
Thanked 4 Times in 4 Posts
moredial is an unknown quantity at this point
  Re: Using <span> within a class

It will either be

span.contentheading span.frontpage

or

span.frontpage .contentheading

depending on whether you want to limit the style to the span tag or all content.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-10-07
Registered User
 
Join Date: Jun 2007
Posts: 270
Thanks: 0
Thanked 0 Times in 0 Posts
MortimerJazz is an unknown quantity at this point
  Re: Using <span> within a class

Thanks moredial - I'm still not having any luck I'm afraid.

Can you run a <span> tag in the middle of a CSS class?

Thanks,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-10-07
DioBach's Avatar
.com
 
Join Date: Dec 2006
Location: Tenby, Wales, UK
Posts: 645
Thanks: 8
Thanked 0 Times in 0 Posts
DioBach seems to know their stuff
  Re: Using <span> within a class

Quote:
Originally Posted by MortimerJazz View Post
Thanks moredial - I'm still not having any luck I'm afraid.

Can you run a <span> tag in the middle of a CSS class?

Thanks,
Why not just create a new css class for the span you want? You can then use the span with a class in the middle of what ever css class your using, it's a great way of over-riding the standard formatting you've set up in your css. You have to watch where you place you span tags though - say you want a non standard H3 or an A that's outside your universal declaration - nest the span in side the tags you want to use to do it - so <a h...><span class="newformatting">Content</span></a> sort of thing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 09-10-07
Registered User
 
Join Date: Nov 2003
Location: London
Posts: 524
Thanks: 0
Thanked 4 Times in 4 Posts
moredial is an unknown quantity at this point
  Re: Using <span> within a class

If you are having problems with the class not working as expected, look at the cascading effect.

The easiest way to do that is using FireFox with the webmaster tools enabled. Then, at the top of the window you see all the styles that apply to the bit of text that you are interested in.

Rather than a .class I prefer the #id which I find easier to follow when I am debugging css that is not behaving as expected. I use the #id to set everything as I want it, reversing the cascading effects where necessary and then use .class to fine tune within the ID.

The bible on css and syntax can be found here: CSS2 Test Suite: Index including the various browsers and their bugs explained (or not explained, depending on your point of view) and most browsers should now display the css2 examples correctly although IE is still behind in its development.

View the page source to fully understand some of the comments.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Airline Network's £25 per Business Class booking incentive! Tom Rigden The Affiliate Marketing Lounge 2 13-08-07 02:02 PM
Compensation from Google Adwords : Has Anyone Recieved This Email? futureweb The Affiliate Marketing Lounge 62 12-07-06 02:37 PM
Quick NI Class 2 Question famousboy Growing Your Business, VAT, TAX and Development 4 23-10-05 11:06 PM
RAC - dont miss out in August Malcolm Cowley buy.at 1 04-08-04 06:37 PM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7