Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Contractible Headers alignment

  1. #1
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Unhappy Contractible Headers alignment

    1) Script Title: Contractible Headers

    2) Script URL (on DD):

    <p class="style2" onClick="expandcontent('sc1')" style="cursor:hand; cursorointer">What is JavaScript?</p>
    <p class="style2">

    <div id="sc1" class="style2; switchcontent">
    JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
    </div>

    3) Describe problem: This thing works fine but what do need to do to change the alignment of the explanation. Example:
    The way I have it, is like this:

    What is java:
    Java is bla bla bla......

    I want it to look like :

    What is java:
    Java is bla bla bla......

    I can put space but is there any css styly i can write for this? I tried putting padding but my whole document content shifts to right.

    Please help!!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by neo_philiac
    1) Script Title: Contractible Headers

    2) Script URL (on DD):
    Please supply a link to the script.
    Quote Originally Posted by neo_philiac

    The way I have it, is like this:

    What is java:
    Java is bla bla bla......

    I want it to look like :

    What is java:
    Java is bla bla bla......
    What's the difference? Style can be applied to any element or class of elements and there are many style property/value pairs to choose from. The trick is to select one(s) appropriate to the effect you want to achieve and applying them to only those elements that you wish to have them apply to.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Sorry he he....

    The way I have it, is like this:

    What is java:
    Java is bla bla bla......

    I want it to look like :

    What is java:
    Java is bla bla bla......

    The problem is i cant apply any margin or padding to that particular text

  4. #4
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    there are line 5 spaces before the Java is bla bla bla......

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    margin-left:2em;

    should work. 5em would technically be 5 characters but, often times it works out to look like more than 1 character per em. This should only be applied to element(s) that you want to have this offset and the width of these elements must either be auto, not set, or less than their parent element to avoid shifting of the entire page. Other style interdependencies could come into play, if you continue to have problems:

    Please post a link to the page on your site that contains the problematic script so we can check it out.


    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jul 2006
    Posts
    142
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    ok now i have a new problem. when I view the page, the header is header by default is expanded. i have to click on twice to get it back to its unexpanded state.

    here is what i did with the class . body 2 is the class with left margin attribute.

    <h3 onClick="expandcontent('sc3')" style="cursor:hand; cursorointer">What is DHTML?</h3>

    <div id="sc3" class="switchcontent; body2">
    DHTML is the embodiment of a combination of technologies- JavaScript, CSS, and HTML. Through them a new level of interactivity is possible for the end user experience.
    </div>

    sorry this is stupid, i know but please help because i need to get it done.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by jscheuer1
    If you continue to have problems:
    Please post a link to the page on your site that contains the problematic script so we can check it out.


    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    here's the missing DD script URL :
    http://www.dynamicdrive.com/dynamicindex1/navigate2.htm

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by jr_yeo
    jr. - Do you have a link to the OP's page as well?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    what's OP?

    whatever it is... the answer is no

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
  •