Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS and JS problem

    Hi there. Got a quick question for you all.

    I am using a CSS in a page. I have the text being indented 2cm at the top and the bottom of the page.

    Using JS, I want to implement the side Slide Menu from DD. Normally, this works.

    When putting that script on the page with CSS, the side bar title (Side Menu) is distorted.

    Since i have a 2cm indentation in CSS, the first letter in the side menu title bar (the "S") gets indented to the 2cm mark along with the other items, but the rest of it ("ide Menu") stays at the left edge of the browser window.

    Is there a way to stop this from happening? I tried tables, but i do not like the way it is done.

    is there a way to implement the JS code into the CSS, then create a doc.write or something similar into the CSS? Or, at least stop the "S" in "Side Menu" to stop going over 2cm?

    any help would be greatly appreciated.

    thanks.
    dan

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you could try this

    <style type="text/css">
    <!--

    .Page{text-indent:2cm;}

    -->
    </style>

    then in the body where you want the indent put

    <a class="Page">
    HI THERE WHATEVER TEXT YOU WANT
    </a>


    PUT MENU

    <a class="Page">
    HI THERE AGAIN
    </a>

    Hope it works for ya
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    after some trial and error, i was able to get it working. I ended up setting up a new p.x entry for everything but the js script.

    Thanks for all the help!!
    dan


  •  

    Posting Permissions

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