From table tags to div and span

This is a discussion on "From table tags to div and span" within the Web Page Design section. This forum, and the thread "From table tags to div and span are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 5th, 2007, 03:24
New Member
Join Date: Dec 2007
Location: CANADA
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
From table tags to div and span

Hi there,

I am planning to switch from TABLE tags to DIV and SPAN tags so we would have the same appearance.

For example the following code, How can I shift it to the DIV and SPAN tags and have the same appearance.

Code: Select all
<table>
  <tr>
     <td>Name:</td>
     <td><input /></td>
</tr>
<tr>
     <td>Last Name:</td>
    <td><input/ ></td>
<tr>
</table>
Thanks in Advance for any help and suggestions
Reply With Quote

  #2 (permalink)  
Old Dec 5th, 2007, 08:26
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: From table tags to div and span

There is a way you could do that in CSS, but it is not advisable and it is very complicated!
I have posted the same question here before and all of the professional developer/designer here suggest me to use table for this type of case
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

Last edited by Monie; Dec 5th, 2007 at 08:29.
Reply With Quote
  #3 (permalink)  
Old Dec 5th, 2007, 09:29
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: From table tags to div and span

here is some code I use that is similar to your code above.

HTML: Select all
<fieldset>
  <legend>Contact Details</legend>
  <ol>
  <li>
  <label for="name">Name :</label>
  <input id="name" name="name" class="text" type="text" style="background-color:#CCCCCC"  /> 
  </li>
  <li>
  <label for="email">Email Address :</label>
  <input id="email" name="email" class="text" type="text" style="background-color:#CCCCCC"  /> 
  </li>
  <li>
  <label for="phone">Telephone :</label>
  <input id="phone" name="phone" class="text" type="text" style="background-color:#CCCCCC"  /> 
  </li></ol>  
  </fieldset>
And the CSS.

HTML: Select all
fieldset {
margin: 1.5em 0 0 0;
paddinng: 10px;
color:#878b38;
}
legend {
margin-left: 1em;
color:#878b38;
font-weight: bold;
font-size:14px;
}
fieldset ol {
padding: 1em 1em 0 1em;
list-style:none;
color:#878b38;
}
fieldset li {
padding-bottom: 1em;
color:#878b38;
}

label{
display:block;
color:#878b38;
font-weight: bold;
}
you can have a play around with it.
Reply With Quote
  #4 (permalink)  
Old Dec 5th, 2007, 12:23
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: From table tags to div and span

I've made a thread in the Beginners' Resources section about this

[CSS] Customize your form with CSS
Reply With Quote
  #5 (permalink)  
Old Dec 5th, 2007, 22:09
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: From table tags to div and span

I use divs to format forms all the time. It's just a little annoying, that's all...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
  #6 (permalink)  
Old Dec 5th, 2007, 22:50
New Member
Join Date: Dec 2007
Location: CANADA
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: From table tags to div and span

Quote:
Originally Posted by swagner View Post
I use divs to format forms all the time. It's just a little annoying, that's all...
BUT how you are using divs to format forms ? Any example if possible?

Thanks in Advance
Reply With Quote
  #7 (permalink)  
Old Dec 5th, 2007, 22:57
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: From table tags to div and span

Well, I put the form <label> into a div, and the <input> into another div. Then, I put it all inside the <form>. Simple, really...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Title Tags, Meta Tags and SEO - Keyword Density or Keyword Spamming? pctank Search Engine Optimization (SEO) 2 Jul 4th, 2008 11:52
Can <span></span> tags have position relative? Oak Web Page Design 13 Mar 9th, 2008 17:04
<SPAN> help Access JavaScript Forum 2 Nov 3rd, 2007 18:13
Div and Span tags... jjgamepro17 Web Page Design 4 Nov 7th, 2006 19:22
Span questions maxelcat Web Page Design 2 Aug 7th, 2006 11:07


All times are GMT. The time now is 05:05.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43