Results 1 to 6 of 6

Thread: How to use javascript to create HTML and CSS

  1. #1
    Join Date
    Feb 2010
    Posts
    796

    How to use javascript to create HTML and CSS

    Hi all,

    I am a web page designer.I found that when a page layout for a long while the navigation menu is at the top of the page, usually cause inconvenience on me, thus reducing the site user experience.With the navigation menu can not be allowed to scroll down the page to follow the float it. Now i want to know that how to use javascript to create HTML and CSS. I prefer code. Thanks in advance.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,521

    How to use javascript to create HTML and CSS

    I will give you the step of creating a CSS navigation bar. The navigation bar is divided into three sub-navigation bar.

    Code:
    <div id="floatMenu123">
    <ul class="menu123">
    <li> <a href="#" onclick="return false;"> Welcome mysite.net </ a> </ li>
    </ ul>
    
    <ul class="menu211">
    <li> <a href="#" onclick="return false;"> JavaScript </ a> </ li>
    <li> <a href="#" onclick="return false;"> CSS </ a> </ li>
    <li> <a href="#" onclick="return false;"> XHTML </ a> </ li>
    <li> <a href="#" onclick="return false;"> PHP </ a> </ li>
    </ ul>
    
    <ul class="menu312">
    <li> <a href="#" onclick="return false;"> hi </ a> </ li>
    </ ul>
    </ div>

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: How to use javascript to create HTML and CSS

    You can set the menu CSS effects, where much that it was only used in are set .cssUsed to set up between <ul> Tags padding: 0 and margin: 0.

    Code:
    body (
    background-color: # 0021;
    height: 1000px;
    color: # ccf;
    font: 10px verdana, sans-serif;
    }  
    # floatMenu (
    position: absolute;
    top: 125px;
    left: 75%;
    margin-left: 230px;
    width: 100px;
    }  
    # floatMenu ul (
    margin-bottom: 10px;
    }  
    # floatMenu ul 1 (
    display pink ;
    border: 1px solid # 995;
    background-color: # 221;
    border-left: 6px solid # 991;
    text-decoration: none;
    color: # ccq;
    padding: 4px 4px 4px 32px;
    }

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    How to use javascript to create HTML and CSS

    I will give you following tips to use javascript to create HTML and CSS.
    # Body inside the height attribute set to 2000px in order to demonstrate this effect, the practical application.
    # left set to 50%, that is, the menu is relatively easy to set the location, easy to move.
    # Not do in other parts of the CSS code for interpretation, it appears as a modification of art including three sub-level menu menu.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    How to use javascript to create HTML and CSS

    We have been doing the page layout and structure of the menu bar. Naturally, this step we will start to add JQuery code to generate dynamic effects. Where we use the JQuery library and DImensions-based plug-ins. The role of this plug-in is to obtain the client browser to a variety of parameters, such as height, width and scroll bars and the like. Please note that <head> ...</ head> area of the first library outside the chain of the base JS files, and then is the plug-in JS file. Second, note that the path to ensure proper storage.
    Code:
    <script language="javascript" src="jquery_mini123.js"> </ script>
    <script language="javascript" src="jquery.dimensions123.js"> </ script>

  6. #6
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to use javascript to create HTML and CSS

    You can start to add our JavaScript statement, the first <head> to add a JavaScript tab, and then add the following statement:
    Code:
    <script language="javascript">
     (document). ready (function () (
    });
    </ script>
    Ready () in the function and window.onload () is similar, but there are different, can be said that an improved version. window.onload () is the entire page download has finished (DOM and the various elements) when triggered, while the (document). ready () is only triggered after the DOM is loaded. Advantages are obvious. Check and reply.

Similar Threads

  1. Create iPhone application in HTML, CSS and Javascript
    By Lakshmigopal in forum Software Development
    Replies: 6
    Last Post: 15-10-2010, 10:34 AM
  2. How to replace HTML code using javascript
    By visioneye in forum Software Development
    Replies: 6
    Last Post: 11-05-2010, 11:38 PM
  3. HTML/JavaScript/onclick
    By KADEEM in forum Software Development
    Replies: 4
    Last Post: 03-11-2009, 06:37 PM
  4. JavaScript code outside html page
    By Gefry in forum Software Development
    Replies: 3
    Last Post: 30-04-2009, 03:53 PM
  5. JavaScript with HTML Parsing!
    By Samsher in forum Software Development
    Replies: 4
    Last Post: 02-02-2009, 12:30 PM

Tags for this Thread

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
  •  
Page generated in 1,711,614,986.81492 seconds with 17 queries