Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS HELP NEEDED — (Better) Tabs with Round Out Borders

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #46172
    paultnylund
    Participant

    Original Article: https://css-tricks.com/better-tabs-with-round-out-borders/

    How do I include content within a tab? I am a coding noob (sort of) and am confused by the method to embed content.

    > Editor’s note: I added anchor links inside the tabs in the demo since I think it’s the most likely case that tabbed navigation like this have them. Most likely, they would have an href attribute that would link to the content they go with by id, and that behavior would be controlled by JavaScript. The fact that this tutorial doesn’t need the anchor links for the extra pseudo elements is further testament to it being better than my original.

    I want to be able to toggle between different iframe objects. Feedback is _much_ appreciated!

    Thank you,
    Paul

    #141503
    georgearnall
    Participant

    Hi Paul,

    I have written a [codepen](http://cdpn.io/dzBju “codepen”) showing how you could achieve this. I copied the styles from the post you mentioned to the pen so it looks the same.

    You could improve this by making the tabs automatically add the necessary class names on page load, for now this is manual.

    If you wanted to use iFrames then you can just put an iFrame inside of the content div.

    #141840
    paultnylund
    Participant

    Thank you so much!! I’ve been trying to figure out how to do this for days now! I’ll give your code a shot and get back to you with the results. :)

    #141872
    paultnylund
    Participant

    Woo!! It worked! YOU ARE AWESOME

    #141878
    paultnylund
    Participant

    …almost haha ;)
    My body is now shifted approx. 40px to the right… Would you know why?
    The body of my website is 100% wide, no padding.

    #141939
    georgearnall
    Participant

    Is there anyway you can show me, with a codepen or just give me a link to it hosted somewhere ?

    Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.