Results 1 to 5 of 5

Thread: need help with children selectors

  1. #1
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default need help with children selectors

    Code:
    .productBorder {
    background: url("http://www.distributorcentral.com/websites/ImperialScottSpecialtiesdiscounts/preview/images/imperial-logo-ribbon.png") no-repeat scroll left bottom #FFFFFF;
    border: 1px solid #EEEEEE;
    border-radius: 10px 10px 10px 10px;
    margin: 5px;
    text-align: center;
    }
    I want to change this per catalog guide.
    like all children of categories get different image
    for the .product border


    my website is a little different than others,see fire bug

    what I really wanted was different corner ribbons/icons for the children
    of the catalogs/ titles, So customer would know what section they were in but don't know how to do it.


    I'll settle for changing productborder per children of categories/titles

    Have any idea how to do either of these?

    Even better would to put a label ribbon icon on just the products I like in each of the categories.

    My website is http://www.distributorcentral.com/we...tiesdiscounts/
    Last edited by Beverleyh; 07-20-2013 at 08:07 AM. Reason: Formatting fixed and broken link removed

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,007
    Thanks
    25
    Thanked 585 Times in 565 Posts
    Blog Entries
    37

    Default

    I'm a bit confused by your statement -
    my website is a little different than others,see fire bug
    Why is it different? And why did you feel like you needed to mention it?

    Anyway, back to your question. The obvious suggestion would be to create a new class with different styles (put it after the parent CSS in your stylesheet);
    Code:
    .productBorderChild {
    background: url("http://www.distributorcentral.com/websites/ImperialScottSpecialtiesdiscounts/preview/images/imperial-logo-ribbon-child.png") no-repeat scroll left bottom #FFFFFF;
    border: 1px solid red;
    }
    And then apply that class to the elements that need it;
    Code:
    <div class="productBorderChild">
    This would require you to manually edit the markup but if you wanted to automate it with CSS, you could use the child selector to apply the new styles to "the child of .productBorder" - something like;
    Code:
    .productBorder > div
    More info on child selectors here: http://css-tricks.com/child-and-sibling-selectors/

    However, I searched on your markup and couldnt find anything with the "productBorder" class, so I don't know what you're applying it to or what you're calling "children".

    You mentioned "children of categories/titles", but likewise, I searched on those terms and couldn't find any elements with those classes either. But, with your page having around 1600 lines of markup, and using many nested tables, its very hard to make sense of things.

    I don't know if this has answered your questions, but if it hasn't, please try to provide more information and make sure that classes/elements you're asking questions about actually exist in your markup. I know you have provided the page link, but really, that could be ANY page because I cant relate it to your questions. Or was the broken link that you posted (that I deleted) for the page with "productBorder" class/elements?

    It would also help if you could provide a slimmed-down page with just a few dozen lines - 1600 is much too overwhelming for outsiders to digest.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank Bev,
    I maybe back I soon .

  4. #4
    Join Date
    Mar 2013
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I can not figure out how to post on this? Question 1 how to ask a question in a post?

    question 2 Is there any carousel plug in jquery that will work eith DDMega Menu that I love. (without conflict)

    One button over just comes down maybe 1/4 inch one doesnt come down and so one on tired of uploadin and trying over?

  5. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,007
    Thanks
    25
    Thanked 585 Times in 565 Posts
    Blog Entries
    37

    Default

    I can not figure out how to post on this? Question 1 how to ask a question in a post?
    ? You're asking a question already.

    We need to see what is conflicting in order to suggest a fix. Post both a link to the script of the DD Mega Menu and your own page that demonstrates the problem. To be sure that the menu is causing the conflict with your slider, setup a test page that includes ONLY those 2 scripts - no extra code, markup or CSS. Nobody likes to wade through extra code and a smaller page will be easier to work with.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. navigation a selectors
    By RDLyTN in forum HTML
    Replies: 0
    Last Post: 11-16-2011, 10:47 AM
  2. How to use 2 ID CSS selectors in a rule
    By sniperman in forum CSS
    Replies: 1
    Last Post: 08-18-2011, 02:48 PM
  3. Simple HTML DOM can't get children
    By tixrus in forum PHP
    Replies: 2
    Last Post: 02-16-2010, 12:22 PM
  4. Resolved Need help with advanced CSS selectors
    By C55inator in forum CSS
    Replies: 2
    Last Post: 06-29-2009, 06:04 PM
  5. non inherited selectors
    By altein in forum CSS
    Replies: 1
    Last Post: 02-18-2008, 02:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •