homepage Welcome to WebmasterWorld Guest from 54.196.198.213
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Creating table for wp page
Buzz




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

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>

 

Buzz




msg:4207768
 10:55 pm on Sep 27, 2010 (gmt 0)

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>

sanji41




msg:4207787
 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!

Buzz




msg:4207802
 12:37 am on Sep 28, 2010 (gmt 0)

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!

sanji41




msg:4207819
 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.

sanji41




msg:4207821
 1:33 am on Sep 28, 2010 (gmt 0)

i forgot, li{list-style-type:none;} wont show the bullet.

Buzz




msg:4207825
 1:46 am on Sep 28, 2010 (gmt 0)

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?

sanji41




msg:4207826
 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

Buzz




msg:4207830
 2:02 am on Sep 28, 2010 (gmt 0)

Thanks so much, Sanji.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved