Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-01-2011, 01:19 PM   PM User | #1
ravi9510
New Coder

 
Join Date: Jul 2011
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
ravi9510 is an unknown quantity at this point
program using div tag

hi all ,
can u tell me how to modify this html code using <div> tag....
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-EN">
<head>
<script src="jquery-1.2.1.min.js" type="text/javascript"></script>
<script src="menu-collapsed.js" type="text/javascript"></script>	
<link rel="stylesheet" type="text/css" href="style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Simple JQuery Collapsing menu</title>
<style type="text/css">
li a 
{
display:inline-block;
} 
li a 
{
display:block;
}
</style>
</head>
<body>
<h1>Simple JQuery Collapsing menu</h1>
<p>Same menu as seen <a href="./">here</a> but now as a simple collapsing menu.</p>
<ul id="menu">

<li>
  <a href="#">Weblog Tools</a>
   <ul>
	<li><a href="http://www.pivotx.net/">PivotX</a></li>
	<li><a href="http://www.wordpress.org/">WordPress</a></li>
	<li><a href="http://www.textpattern.com/">Textpattern</a></li>
	<li><a href="http://typosphere.org/">Typo</a></li>			
   </ul>		
</li>		

<li>
  <a href="#">Programming Languages</a>
   <ul>
      <li><a href="http://www.php.net/">PHP</a></li>
      <li><a href="http://www.ruby-lang.org/en/">Ruby</a></li>
      <li><a href="http://www.python.org/">Python</a></li>
      <li><a href="http://www.perl.org/">PERL</a></li>
      <li><a href="http://java.sun.com/">Java</a></li>
      <li><a href="http://en.wikipedia.org/wiki/C_Sharp">C#</a></li>
   </ul>
</li>

<li><a href="http://www.i-marco.nl/weblog/">Marco's blog (no submenu)</a></li>

<li>
   <a href="#">Cool Stuff</a>
   <ul>
	<li><a href="http://www.apple.com/">Apple</a></li>
	<li><a href="http://www.nikon.com/">Nikon</a></li>
	<li><a href="http://www.xbox.com/en-US/">XBOX360</a></li>
	<li><a href="http://www.nintendo.com/">Nintendo</a></li>
   </ul>
</li>
		
<li>
   <a href="#">Search Engines</a>
   <ul>
	<li><a href="http://search.yahoo.com/">Yahoo!</a></li>
    <li><a href="http://www.google.com/">Google</a></li>
	<li><a href="http://www.ask.com/">Ask.com</a></li>
	<li><a href="http://www.live.com/?searchonly=true">Live Search</a></li>
  </ul>
</li>
</body>
</html>
ravi9510 is offline   Reply With Quote
Old 08-01-2011, 01:39 PM   PM User | #2
vikram1vicky
Regular Coder

 
Join Date: Jul 2011
Location: India
Posts: 496
Thanks: 3
Thanked 57 Times in 56 Posts
vikram1vicky is an unknown quantity at this point
Why you want change it and what issue with this code
vikram1vicky is offline   Reply With Quote
Old 08-01-2011, 02:19 PM   PM User | #3
ravi9510
New Coder

 
Join Date: Jul 2011
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
ravi9510 is an unknown quantity at this point
reply

instead of using paragraphs and list ...can we use only div tag...
whether is it possible
ravi9510 is offline   Reply With Quote
Old 08-01-2011, 03:14 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Of course it’s possible but it’s not semantic.

Good reads:
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 08-02-2011, 06:07 AM   PM User | #5
ravi9510
New Coder

 
Join Date: Jul 2011
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
ravi9510 is an unknown quantity at this point
reply

actually we are using div tag instead of paragraphs or for some other purpose.....can u give me one example...what is the use of div tag......
ravi9510 is offline   Reply With Quote
Old 08-02-2011, 06:32 AM   PM User | #6
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
the <div> tag has become more of a structural part of the page. it's a "divison" of the page. you have a header, a content, a column in that content. essentially these are all defined as divisions.

however, it can also be used if something is neither a paragraph or a heading (h1, h2..)
Sammy12 is offline   Reply With Quote
Old 08-02-2011, 12:14 PM   PM User | #7
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,579
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by Sammy12 View Post
however, it can also be used if something is neither a paragraph or a heading (h1, h2..)
Unless it’s a list where list items are semantically the only right choice.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:52 PM.


Advertisement
Log in to turn off these ads.