Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2008
    Location
    Covington KY.
    Posts
    95
    Tokens
    0

    Default HTML5 + CSS3 question!



    So basically, the image above is just a rough layout of a site I am attempting to create.
    I want to know if it is possible to produce a cascading affect(effect?), where, when the black boxes, or icons as they would be, are clicked it causes the video and its info to collapse into one line showing only the name of the song and the artist, and vice-versa, where instead of collapsing it would expand, showing the video and its complimentary info right next to it.

    If this is possible, could you please share how to do this with me? +REP for answers!

    Thaaankkk yooooouuu in advance.

    1/4th​.

    moderator alert Edited by efq (Forum Moderator): Threads merged because you had two threads that are about the same topic.
    Last edited by efq; 15-09-2012 at 08:33 AM.
    "I can't do anything about the past, and I don't know what the future holds. But when I wake up in the morning, I can make up my mind to do my best to enjoy my day. I will strive higher, rise above obstacles and live in health, abundance and victory. I submitted myself to God and my all is in His hands. God will strengthen my weakness and He will heal my pain and bruises."
    Bel Claveria Craig Martinez

  2. #2
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    You'd have to use Javascript for this, sorry I can't be of more help, I'm terrible when it comes to JS
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  3. #3
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    By the sounds of it your just after a show-hide (or possibly accordion if you want to limit it to one panel open at a time).

    If you have jquery and lay the showhides out somthing like this:

    Code:
    <div class='showhide'><div class='title'>Some information</div><div class='content' style='display:none;'> More stuff, video etc<div> </div>
    You could just use somthing like

    Code:
    $('.showhide .title').click(function(e){ var t = $(this).parent().find('.content'); if(t.css('display')=='none'){t.css('display','block')}else{t.css('display','none');}   }
    (please note i just free wrote the above so there are probably a few typos etc)

  4. #4
    Join Date
    Jul 2008
    Location
    Covington KY.
    Posts
    95
    Tokens
    0

    Default

    Quote Originally Posted by Mentor View Post
    By the sounds of it your just after a show-hide (or possibly accordion if you want to limit it to one panel open at a time).

    If you have jquery and lay the showhides out somthing like this:

    Code:
    <div class='showhide'><div class='title'>Some information</div><div class='content' style='display:none;'> More stuff, video etc<div> </div>
    You could just use somthing like

    Code:
    $('.showhide .title').click(function(e){ var t = $(this).parent().find('.content'); if(t.css('display')=='none'){t.css('display','block')}else{t.css('display','none');}   }
    (please note i just free wrote the above so there are probably a few typos etc)
    This accordion affect that you speak of is actually exactly what I am looking for. Would this script above work for this affect?

    Also, since I have no experience in JS myself, I would simply place the code in a separate file titled blahblahblah.js and the html you gave above would then link it to the page?

    Thanks for the help! +REP'd!

    EDIT: Also, what text editing programs for Windows would you recommend? I'm not too fond of Notepad++.
    Last edited by Joey-; 19-08-2012 at 04:41 PM.
    "I can't do anything about the past, and I don't know what the future holds. But when I wake up in the morning, I can make up my mind to do my best to enjoy my day. I will strive higher, rise above obstacles and live in health, abundance and victory. I submitted myself to God and my all is in His hands. God will strengthen my weakness and He will heal my pain and bruises."
    Bel Claveria Craig Martinez

  5. #5
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Hello,

    If you want to go with the accordion, I suspect your best bet is just to use jQuery UI to do the heavy lifting for you. It includes some demos as wel as examples on how to use it. (Essentally you just reference the jQuery & jQuery UI files in your page and call the methods it suggests)

    http://docs.jquery.com/UI/Accordion

    In terms of text editor, if you don't mind the nag screen Sublime Text 2 is pretty awesome http://www.sublimetext.com/ : The actual cost is a little pricey, although it is a lifetime / all equipment licence & you do get unlimited use for free with the trial

  6. #6
    Join Date
    Jul 2008
    Location
    Covington KY.
    Posts
    95
    Tokens
    0

    Default

    Quote Originally Posted by Mentor View Post
    Hello,

    If you want to go with the accordion, I suspect your best bet is just to use jQuery UI to do the heavy lifting for you. It includes some demos as wel as examples on how to use it. (Essentally you just reference the jQuery & jQuery UI files in your page and call the methods it suggests)

    http://docs.jquery.com/UI/Accordion

    In terms of text editor, if you don't mind the nag screen Sublime Text 2 is pretty awesome http://www.sublimetext.com/ : The actual cost is a little pricey, although it is a lifetime / all equipment licence & you do get unlimited use for free with the trial
    Thank you so much! Works perfectly other than the fact that the clickable bar it creates is the width of the page. Would that be fixed after the CSS is applied to the div?
    "I can't do anything about the past, and I don't know what the future holds. But when I wake up in the morning, I can make up my mind to do my best to enjoy my day. I will strive higher, rise above obstacles and live in health, abundance and victory. I submitted myself to God and my all is in His hands. God will strengthen my weakness and He will heal my pain and bruises."
    Bel Claveria Craig Martinez

  7. #7
    Join Date
    Jul 2008
    Location
    Covington KY.
    Posts
    95
    Tokens
    0

    Default

    Merge posts please.

    Another question @Mentor,
    any tips on the customization of the accordion script's layout? Such as background color/transparency?
    Thanks again!
    "I can't do anything about the past, and I don't know what the future holds. But when I wake up in the morning, I can make up my mind to do my best to enjoy my day. I will strive higher, rise above obstacles and live in health, abundance and victory. I submitted myself to God and my all is in His hands. God will strengthen my weakness and He will heal my pain and bruises."
    Bel Claveria Craig Martinez

  8. #8
    Join Date
    Jul 2008
    Location
    Covington KY.
    Posts
    95
    Tokens
    0

    Default

    I'm also having trouble aligning divs side-by-side. Looks impossible to me right now. I used to know how to do it until I got a job. D:
    Halp!
    "I can't do anything about the past, and I don't know what the future holds. But when I wake up in the morning, I can make up my mind to do my best to enjoy my day. I will strive higher, rise above obstacles and live in health, abundance and victory. I submitted myself to God and my all is in His hands. God will strengthen my weakness and He will heal my pain and bruises."
    Bel Claveria Craig Martinez

  9. #9
    Join Date
    Jul 2008
    Location
    Covington KY.
    Posts
    95
    Tokens
    0

    Default

    I'm also having trouble aligning divs side-by-side. Looks impossible to me right now. I used to know how to do it until I got a job. D:
    Take a look at this "demo", if you would: jewvey.webs.com
    I'm trying to position the div/table that's below the video, to the right of the video. And the same with the ul at the top, I'd like to position it to the right of the placeholder logo as well.
    Halp!
    "I can't do anything about the past, and I don't know what the future holds. But when I wake up in the morning, I can make up my mind to do my best to enjoy my day. I will strive higher, rise above obstacles and live in health, abundance and victory. I submitted myself to God and my all is in His hands. God will strengthen my weakness and He will heal my pain and bruises."
    Bel Claveria Craig Martinez

  10. #10
    Join Date
    Jul 2008
    Location
    Covington KY.
    Posts
    95
    Tokens
    0

    Question HTML5 + CSS3 question! Again!

    DEMO

    On the demo site above, I have created a ul and I am trying to create a hover effect over each of the links individually. Unfortunately, the technique I was taught is not working, which is the
    Code:
    #nav li a: link {
                   }
    #nav li a: visited {
                   }
    #nav li a: hover {
                   }
    #nav li a: active {
                   }
    technique.
    Could someone please take a look at my code and tell me what it is I am doing wrong?
    +REP for help.

    P.S.: Sorry for the noob coding questions. I didn't learn much code before I stopped completely. It's hard to just pick back up when I barely learned anything in the first place. :p

    1/4th
    Last edited by Joey-; 24-08-2012 at 05:23 PM.
    "I can't do anything about the past, and I don't know what the future holds. But when I wake up in the morning, I can make up my mind to do my best to enjoy my day. I will strive higher, rise above obstacles and live in health, abundance and victory. I submitted myself to God and my all is in His hands. God will strengthen my weakness and He will heal my pain and bruises."
    Bel Claveria Craig Martinez

Page 1 of 2 12 LastLast

Posting Permissions

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