Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 63

Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
08/25/12 04:16 PM (11 years ago)

nested list with JS

I am having some styling issues trying to run a script i found online here- http://www.howtocreate.co.uk/jslibs/ Here is the script- https://dl.dropbox.com/u/33324452/colapseJSModified.js It creates a nested list that works great, but it keeps putting bullets to the left of each line. I have modified the code to stop the indent and allowed me to use image buttons to expand and hide the content, but I can not get rid of these bullets and it is driving me nuts. I have tried changing the style to 'none', 'inline', or 'table' but it will not change? Anyone with some JS knowledge care to take a look at this? at this point I have even been trying to play with the padding to hide the bullets, but that is not even working... Any ideas would be appreciated.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
08/25/12 04:32 PM (11 years ago)
It's an unordered list - auto bullet points. You could write a bit of css, something like: ul#list { list-style-type: none; } should remove bullets.
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
08/25/12 05:26 PM (11 years ago)
Thanks for the reply, I tried this in several spots and I can not get it to work. I am guessing I am just messing it up. I tried other CSS as well with no results. Here is when the ul starts in the code- <ul id="someID" ***Tried it here***> </li ***Also tried it here***> <li align="left" <h1><img src="https://dl.dropbox.com/u/33324452/Buttons-Collapsed.png" alt=""Tools/ width="100%"padding-left="1%"></h1> <ul> <li><h1><img src="https://dl.dropbox.com/u/33324452/Questions_Button.png" alt="Questions"/width="100%"></h1> <ul> <li>question 1 here</a></li> <ul><li>Answer 1 here</a></li></ul> I have tried putting the CSS behind both the ul & the li and neither works. Should I be placing this in the .js doc?
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
08/25/12 06:10 PM (11 years ago)
In the head of your html document, just before the closing </head> tag, try: <style type="text/css"> ul#list { list-style-type: none; } </style> Then in the body where it says: <ul id="someID"> Change to: <ul id="list"> See if that works.
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
08/25/12 06:14 PM (11 years ago)
Wow, sorry for the stupid post. It has been a long day of screwing with this page today. Finally have it like I want it. I just put it inside the <ul> within the list and <li> on the first line and that took care of it.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
08/25/12 06:17 PM (11 years ago)
lol! Code blurs into a rats nest of gibberish after a long day! Yeah, inline's fine, better practice in the head though imho.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
08/26/12 08:07 AM (11 years ago)
Did you look at the SDNested List on github? Keep coming across it but it looks complex. js works o both platforms so I can see why you are going this route. def use inline CSS styling as a last resort. and stick with css in the header as well. inline is maddening how it overwrites standard css stylesheets. before the Google inspector, dealing with in-line CSS styling was insanity. css styling never goes in .js files. use an xternal .css and link to it in the html doc. copy those .css and .js into the BT_Docs folder. just tell XCode not to compile those .js files.
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
08/26/12 08:20 AM (11 years ago)
Thanks for the note on placement guys. I know once I learn to do some of this the correct way, I am going to have to break some of the bad habits I am learning along the way. I am just diving into JS & CSS so I have a lot to learn. I understand the basics of HTML so I am plugging along trying to figure out certain tasks as I go. My next hurdle is making transparent table backgrounds with rounded corners...
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.