Results 1 to 9 of 9

Thread: Breadcrumbs styling sizes

  1. #1
    Join Date
    Aug 2015
    Location
    Barcelona
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Breadcrumbs styling sizes

    Hi there,

    I was practising my CSS coding skills ( i am still a noob xD ) and tried to create my own breadcrumbs styles for my website, but i am missing something about sizes.

    Click image for larger version. 

Name:	breadcrumbs.jpg 
Views:	199 
Size:	16.3 KB 
ID:	5708

    My problem is that each crumb gets the size of the original title of the page, instead of following the one i wrote on the code, and that's the problem i don't understand.

    I will attach the CSS used on it (ignore colors, still working on it), so you can tell me wether or not there's a mistake on it.

    Thanks in advance for your help.


    Code:
    .breadcrumbs {
        overflow: hidden;
        font: 16px Helvetica, Arial, Sans-Serif;
        margin-bottom: 20px;
    }
    .breadcrumbs a {
        color: white;
        text-decoration: none;
        padding: 5px 0 5px 55px;
        background: cyan;
        background: hsla(250, 100%, 52%, 1);
        position: relative;
        display: block;
        float: left;
    }
    .breadcrumbs a:after {
        content: " ";
        display: block;
        width: 0;
        height: 0;
        border-top: 50px solid transparent;
        border-bottom: 50px solid transparent;
        border-left: 30px solid hsla(250, 100%, 52%, 1);
        position: absolute;
        top: 50%;
        margin-top: -50px;
        left: 100%;
        z-index: 2;
    }
    .breadcrumbs a:before {
        content: " ";
        display: block;
        width: 0;
        height: 0;
        border-top: 50px solid transparent;
        border-bottom: 50px solid transparent;
        border-left: 30px solid white;
        position: absolute;
        top: 50%;
        margin-top: -50px;
        margin-left: 1px;
        left: 100%;
        z-index: 1;
    }
    .breadcrumbs a:first-child {
        padding-left: 10px;
    }
    .breadcrumbs a:nth-child(2)       { background:        hsla(250, 100%, 52%, 1) }
    .breadcrumbs a:nth-child(2):after { border-left-color: hsla(34,85%,45%,1); }
    .breadcrumbs a:nth-child(3)       { background:        hsla(34,85%,55%,1); }
    .breadcrumbs a:nth-child(3):after { border-left-color: hsla(34,85%,55%,1); }
    .breadcrumbs a:nth-child(4)       { background:        hsla(34,85%,65%,1); }
    .breadcrumbs a:nth-child(4):after { border-left-color: hsla(34,85%,65%,1); }
    .breadcrumbs a:nth-child(5)       { background:        hsla(34,85%,75%,1); }
    .breadcrumbs a:nth-child(5):after { border-left-color: hsla(34,85%,75%,1); }
    .breadcrumbs a:last-child a {
        background: white !important;
        color: black;
        pointer-events: none;
        cursor: default;
    }
    .breadcrumbs a:hover { background: hsla(34,85%,25%,1); }
    .breadcrumbs a:hover:after { border-left-color: hsla(34,85%,25%,1) !important; }

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    A link to your actual web page so we can see how the cascade of other styles is affecting things would be better. A live page makes it easier to do edits in developer tools too - code dumps mean extra work for us, having to create a page.
    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
    Aug 2015
    Location
    Barcelona
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Sure, i didn't attach my website because i deactivated the breadcrumbs for the negative impact it could have on my visitors, but i can let it activated for a while. My website is http://ratonesgaming.com
    Last edited by Beverleyh; 08-13-2015 at 06:05 PM. Reason: formatting

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    For some reason, you have <h1> tags in your breadcrumbs so they're screwing around with the size and semantics - the source of your web page is this;
    Code:
    <span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="Go to Ratones gaming." href="http://ratonesgaming.com" class="home">Ratones gaming</a></span> &gt; <span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="Go to OFERTAS DE LA SEMANA." href="http://ratonesgaming.com/oferta-de-la-semana/" class="post post-page current-item"><h1 style="text-align:center"><strong>OFERTAS DE LA SEMANA</strong></h1></a></span></div>
    I notice that you are using Wordpress. Unfortunately, I'm not a Wordpress user so I couldn't tell you why or where these h1 tags are being inserted, or how to fix it (except for setting CSS font-size overrides, but that won't fix the semantics), but maybe it will give you a starting point.
    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

  5. The Following User Says Thank You to Beverleyh For This Useful Post:

    juanperosa (08-14-2015)

  6. #5
    Join Date
    Aug 2015
    Location
    Barcelona
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your help, i managed to override the sizes modifying php files, and now displays well.

    Now i have the next issue: i am using page's titles as breadcrumbs, but some pages do not have title, so does not work for those pages. I found a way to fix it, adding an invisible title for those pages, but i don't know wether or not this could have a negative impact in some way, or if there's another way to fix it.

  7. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    i am using page's titles as breadcrumbs
    Have you got links for examples of both types of pages? I'm not sure what title you mean or how it's affecting the markup (e.g. text between the <title> tags or page headings in <h?> tags)
    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

  8. #7
    Join Date
    Aug 2015
    Location
    Barcelona
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    By title i mean the page title itself, the first column of page's dashboard, not the title tag, which would be so long for breadcrumbs.

    I attach a photo so you can see what i mean and the html i used so all pages appear on breadcrumbs, having an invisible title when i did not use one, so breadcrumb uses this "invisible" custom title heading, instead of nothing.

    Click image for larger version. 

Name:	title photo.jpg 
Views:	111 
Size:	10.2 KB 
ID:	5712
    Last edited by juanperosa; 08-14-2015 at 08:59 PM. Reason: Improving content

  9. #8
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I'm still none the wiser. Im not a Wordpress user - I don't understand how this fits into or affects the page source, or what part of the "dashboard" affects X of the web page structure.

    The image means nothing in the grand scheme of things. Where exactly in the markup does that code appear? That's why I asked for links to example pages so I could see the source code (hoping to glean some meaning from your post).

    Going back to your post...
    i am using page's titles as breadcrumbs, but some pages do not have title, so does not work for those pages. I found a way to fix it, adding an invisible title for those pages, but i don't know wether or not this could have a negative impact in some way, or if there's another way to fix it.
    I don't really understand what youre asking. Breadcrumbs are not part of a web page structure in the same sense that a <title> is, so they don't have any bearing on page semantics. They're normally just a series of anchor tags that help with user experience.
    Last edited by Beverleyh; 08-14-2015 at 10:06 PM.
    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

  10. #9
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    There are several Wordpress plugins to create Breadcrumbs. This is probably the most powerful of them and might be worth a try.

Similar Threads

  1. "Breadcrumbs" for menu?
    By lu__22 in forum JavaScript
    Replies: 1
    Last Post: 09-03-2010, 08:36 PM
  2. problem with font sizes and em
    By mayanktalwar1988 in forum CSS
    Replies: 1
    Last Post: 10-02-2009, 05:24 PM
  3. Breadcrumbs!
    By rainarts in forum JavaScript
    Replies: 2
    Last Post: 07-31-2008, 11:31 AM
  4. Tab Sizes for Tab Content Script
    By bconley in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-09-2007, 12:12 AM
  5. Image Sizes
    By ausdrew in forum Dynamic Drive scripts help
    Replies: 7
    Last Post: 04-14-2007, 04:47 AM

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
  •