Welcome to WebmasterWorld Guest from 54.158.143.40

Forum Moderators: incrediBILL

Message Too Old, No Replies

Creating table for wp page

   
10:52 pm on Sep 27, 2010 (gmt 0)

5+ Year Member



Hi,

The Services page of my site lists what's offered but it's a long vertical list that disappears below the fold. I wanted to do a simple table that I'd then insert in my Wordpress page editor.

Questions:

1. Any input re. a table in wordpress? Known pitfalls or problems?

2. For my code below in particular, anyone know why there's so much space between the first row, left header and the list of items underneath it? I'd like it to look like the text underneath the header to the right (that is, close up the spaces so list appears directly under header). It displays this way in both Firefox and Safari. I'm on an iMac with 10.5.6.

I haven't coded in a while so I may be missing something really basic here. Apologies.

<body>
<table border="0" bgcolor="#ffffff" width="60%" cellpadding="2" cellspacing="0">
<tr>
<th align="left">
Left Header
</th>
<th align="left">
Right Header
</th>
</tr>
<tr>
<td align="left">
<em>Left List Subhead</em><br />
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. <br /><br />
<em>Left List Subhead</em><br />
Aenean massa. Cum sociis natoque penatibus.<br /><br />
<em>Left List Subhead</em><br />
Nulla consequat massa quis enim.<br /><br />
<em>Left List Subhead</em><br />
Maecenas tempus, tellus eget condimentum rhoncus.<br />
</td>
<td align="left">
<em>Right List Subhead</em><br />
Item<br />
Item<br />
Item (Maecenas tempus, tellus ege)<br />
Item<br />
Item<br />
Item<br />
Item<br />
Item<br />
<br />
<em>Right List Subhead</em><br />
Item<br />
Item<br />
Item<br />
Item<br />
Item<br />
Item<br />
Item<br />
Item<br />
Item<br />
</td>
</tr>
<tr>
<th colspan="2" align="left">
Final row, Right Header
</th>
</tr>
<tr>
<td align="left">
Sed consequat, leo eget bibendum sodales, augue velit cursus nunc.<br /><br />
Aenean vulputate eleifend tellus.<br /><br />
Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.<br /><br />
Donec sodales sagittis magna.<br /><br />
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
</td>
</tr>
</table>
</body>
10:55 pm on Sep 27, 2010 (gmt 0)

5+ Year Member



Oops. Sorry about forgetting Doctype/head:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
<title></title>
</head>
11:49 pm on Sep 27, 2010 (gmt 0)



hi, i suggest you use <ul><li> 'coz its easy to maintain and design. you can use them for tubular format. hope this helps!
12:37 am on Sep 28, 2010 (gmt 0)

5+ Year Member



Hi Sanji,

Thanks for that thought but it's not so much that I need bullets as I'd like one section to float to the right of the other so people don't have to scroll so far down to get info (as you probably know, they won't).

So it would be:

One sxn starts left----------------Second sxn starts to the right


And third sxn appears here.


Divs? Table? And why is code I included inserting those spaces?

Thanks for any assistance!
1:32 am on Sep 28, 2010 (gmt 0)



well, you can use this:
ul{
float:right;
margin:5px;
}
li{
padding:5px;
}
it will stack the li to the right,and mimic the table like form.
give me a heads up with this.
1:33 am on Sep 28, 2010 (gmt 0)



i forgot, li{list-style-type:none;} wont show the bullet.
1:46 am on Sep 28, 2010 (gmt 0)

5+ Year Member



Hmmmm. Sounds interesting. So I could do that for the first two sxns. The third sxn would appear normally underneath, with no special coding (italic header, align left)?

To avoid having all unordered lists do this, I should add this CSS code within the specific template's CSS, right?
1:51 am on Sep 28, 2010 (gmt 0)



yes, create a css code for them and you can try to switch float:left or right, see which is best. i've used this a lot on my project, let me know if there's more problem :D
2:02 am on Sep 28, 2010 (gmt 0)

5+ Year Member



Thanks so much, Sanji.