HTML - Collapse And Expand Paragraph On Click...
This is frustrating, I'm looking for that code, working in IE and Firefox.
Please help! Similar TutorialsWhat is the HTML code for expanding and collapsing the contents, when clicking on a text, on a page? Just a plain and quick code for this option. Thank you very much. Hi, i enclose the zip file, where are some files. If you click on 1start.html (best viewed in IE) and than click on "group1" and on "1.general1" it right frame should appear the content. So far so good. Later when I want to show/hide or collapse/expand the content and I click on the icon, something doesn't work. Can anyone pleease look in this code and tell me what's wrong. I seem not to know what i'm doing wrong. thank you all Hey, I'm trying to write some code for expanding and concealing text You can see this in action at youtube when you click the (more) button to expand text. Suppose I had a heading: MyHeading and a body of text: MyTextHere How do I make it so that when you click MyHeading it makes MyTextHere (initially not visible) appear, and when you click MyHeading again, it makes MyTextHere disappear? Thanks Alot. hi how to make a table element collapse? Hello, i found this code Code: <!-- Collapsible Menu Script. Created by Kyle Edwards. Please keep this notice intact. --> <!-- Below is the code for the hyperlinks that expand and collapse the menus. You need to do the following for each menu: 1. Create hyperlink code that looks like this: <a href="#" onclick="collapse_menu(menu1, 0)">The value of the link goes here.</a><br> Note: Change menu1 to the name of the menu, and change 0 to the number of the menu. Note: 0 is the number of the FIRST menu. 2. After each hyperlink, type in code that looks like this: <span id="menu1"></span> Note: Change "menu1" to the name of the menu. 3. Follow the instructions inside the <script> tags. They follow //'s. --> <p> <a href="#" onclick="collapse_menu(menu1, 0); return false">Menu 1</a><br> <span id="menu1"></span> <a href="#" onclick="collapse_menu(menu2, 1); return false">Menu 2</a><br> <span id="menu2"></span> <script language="javascript"> //Collapsible Menu Script. //Created by Kyle Edwards. //Please keep this notice intact. //This defines the arrays that contain info about the menus. Do NOT edit. var on_off=new Array(); var menu_code=new Array(); //Below, define number_of_menus. It should be equal to the number of menus you have. number_of_menus=2; //Here we define the code for the menus. Inside the quotation marks, type in the value of each option. //Note: After each option, you need to put a <br> tag. //Note: If you want to indent the options, type for each space of indentation. //and a </blockquote> tag at the end. //Example: " Option 1<br> Option 2<br>" //This puts two spaces at the beginning of each option. menu_code[0]="Option 1<br>Option 2<br>Option 3<br>"; menu_code[1]="Option 1<br>Option 2<br>Option 3<br>"; //Everything below this notice is the code that expands and collapses the menus. Do NOT edit. for (loop=0; loop<number_of_menus; loop++){ on_off[loop]=0; } function collapse_menu(menu_id, menu_number){ if (on_off[menu_number]==0){ menu_id.innerHTML=menu_code[menu_number]; on_off[menu_number]=1; }else{ menu_id.innerHTML=""; on_off[menu_number]=0; } } </script> It's exactly that kind of Code i need, i dont want any more Features on my Colapse Box. The only problem i got is that if i try to add a link for an Option, the Colapse Box dont work anymore. Hope you can help me Hello guys . As everybody knows , <DIV> and <P> are really necessary elements in web pages . Bye the way , I wanna have a limited paragraph . Imagine , I have paragraph ( 300 X 400) . I wanna limit text to this paragraph . I mean , when I put a lot of words and characters in this paragraph , the text goes to next line automatically . Like this forum . When you put your text here , If it's a long text , it'll be separate to several lines and doesn't take one long line . for example , please check me personal web site . first post of this site has taken a long line and destroyed everything . I put it the text in limited paragraph , div , table and etc but it didn't work and again shattered boarders and didn't attention to size of elements ( width and height ) . http://ehsanrajabi.ir Hi, is there anyway to make a sup on a paragraph? if so, could you tell me how, please? Paul Weinstock I am needing to place my paragraph alongside my title.. I am using the following code..
Code: <div align="justify"><strong><font color="#306">TopicHere</font></strong><br />TextHere</div> The above is not giving me what I need, What I need is shown here .. What I need is here Thank You for your help David I have a simple website at justinrepairs.com. The code is all plain old HTML. I have tried adjusting everything I can think of to make the owner's name in column 1 fit on 1 line. I've widened rows, columns, etc. Please help if you can. The source code should be right there for you to see. Thanks so very much for any and all help! Ok I am having a really weird problem. I have a simple div that has some images in it and I am trying to center them. I added text-align: center to the div that wraps the images but it doesn't center the images like it should. Also, I have a radio button below the image that is wrapped in <p> </p> tags. It looks right in FF of course, but in IE7 it puts the radio button to the side of the picture instead of below like it should when it is wrapped in paragraph tags. Anyone have any idea why this might be happening? http://www.mesquitechristmas.com/loc...?action=images The link is a secure page but I have removed the session and disabled the function so the page should display. -Thanks Hello, First post here. I have a quick question regarding the default manner in which Firefox handles different <h> tags. In an html page if I have the following code... Code: Some Text <h3>Headlines!</h3> More Text In Internet Explorer it renders how I want it to like this... --------------------------------- Some Text HEADLINES! More Text --------------------------------- But in Firefox it throws in a hard return before and after the <h3> as such... --------------------------------- Some Text HEADLINES! More Text --------------------------------- I know I need to define an additional property in my h3 class but I am honestly not sure what that would be! Any help is appreciated. Hi everyone, not sure if this is possible but I would like to have a page that has two textboxes - "1: Input" and "2: Output" So if you copy a few paragraphs from MSWord into that first input box, then click a button that says "Convert", the second Output box shows up with the same text only with a full line break in between paragraphs (not put html tags like <BR> in it) My reasoning is that in word, you can distinguish between paragraphs because of tabbing, but when you copy/paste it into a forum post, it just mushes together and becomes very difficult to read, making line breaks the best way to separate. Example: Input: Code: Once upon a time blah blah blah. The next day thirty people died. It was sad. Output: Code: Once upon a time blah blah blah. The next day thirty people died. It was sad. Thank you! Hello everyone, I am new here and I am have a very odd problem with one of my paragraph tags. It is placed at the bottom of the main content just before the footer. Yet it thinks it encompasses all of the content in the main content div. When I use css to make the font bigger, only the paragraph changes font size. None of the other text, such as links, changes font size. That's what's supposed to happen. But when I add a top margin to the paragraph to try to move it down, all of the content in the main content div moves down. I am thoroughly confused. Can somebody help me understand why this is happening? http://www.iankovi.com/htmlllll.html http://www.iankovi.com/csssss.css Any suggestions? I confess that I am a total 'noob' at 74 years old, and will probably get flamed for this question - but here goes - I have taken the on-line HTML course for basic set up and have built a web page; however, it is so bad I do not want to launch it until I can get some issues corrected. PROBLEM 1 - I built the file in 'notepad' text writer. When I look at my internet at 'open', 'brouse', 'index.html' file, and select 'OK', the features show up as I want; however, when I upload the file to my web page, the image is a square with a red X. I set up the image by adding the following line to the file: <img src="xxx.jpg"> PROBLEM 2- In spite of adding <p> </p> at the beginning and ending of my paragraphs, after uploading, the webpage displays each paragraph of text as one long line of text. Can someone advise where I am going wrong? Bob Hi I noticed that ie6 renders paragraph breakline spaces bigger than ie7 or FF. I got around it by using <br /><br /> instead of <p></p>, but is there a proper workaround to make ie6 conform? Also also tried stipulating the CSS for the p tags, but to no avail: .maintext { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; color:#fff; text-align:justify; line-height:100%; } .maintext p { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; color:#fff; text-align:justify; line-height:100%; } Cheers Shaun I''m trying to center the main title of the page: Combative Conditioning $50 per month http://lmiinc.com/combat_conditioning.html It seems to be off to the right a lot... But I have it text-align: center; Any ideas? Thanks. I am in the process of re-designing my website. old site www.ghilliesuitsource.com new site still a work in progress www.ghilliesuitsource.com/gss_test I am struggling with 2 things on my new site. 1) The parallelogram (tilted rectangle) images in the background are seperated by paragraph breaks so that I can alternate between left and right aligned. While all of the forground "stuff" text and product images are AP DIV elements so they hold their spacing. Page looks like I intend it to in IE but netscape/firefox appear to use a different paragraph break line size causing the forground "stuff" to appear lower and lower with respect to the parallelograms, and it gets worse the further down the page you go. 2) It appears as though IE will not change text size inside an AP DIV element when you go to "view-Text Size" This is good because I am using a graphic to act as a border around text. Netscape and Firefox do change font sizes in AP DIV elements so when you select a larger fontsize the text "spills" out of the border. If you can help me out with either of these problems I would certainly appreciate it. How can I prevent search engines from indexing a paragraph? I know that with <META NAME="ROBOTS" CONTENT="NOINDEX"> you can prevent search engines from indexing a page. But I just want to stop them from indexing one paragraph in a page, not the whole page. |