If it can be done with CSS, a link to the site where it can be seen might allow someone to help.
It may require modifying the code that displays the Custom Fields. Can you post a dozen or so lines of that code?
The URL for where I currently am is http://hwww.hertsvolleyball.co.uk/hva/teams/local-teams/harriers-st-albans/
I have changed the meta to replace the unordered list for a <span> in post-template.php
function the_meta() {
global $id;
if ( $keys = get_post_custom_keys() ) {
echo "<span class='post-meta'>n";
foreach ( $keys as $key ) {
$keyt = trim($key);
if ( '_' == $keyt{0} )
continue;
$values = array_map('trim', get_post_custom_values($key));
$value = implode($values,', ');
echo "<span class='post-meta-key'>$key:</span> <span class='post-meta-value'>$value</span></br>n";
}
echo "n";
}
}
in style.css I currently have the following to format the custom fields, which I know isn’t right, but I have run out of ideas.
.post-meta-value {color: blue; left:400px; width:400px;}
.post-meta-key {font-weight: bold; font-size: 110%; width:200px;}
I have been experimenting with absolute and relative positioning and just can’t seem to get it right.
Thanks
Try this for your function:
function the_meta() {
global $id;
if ( $keys = get_post_custom_keys() ) {
echo "<div class='post-meta-table'>\n";
foreach ( $keys as $key ) {
$keyt = trim($key);
if ( '_' == $keyt{0} )
continue;
$values = array_map('trim', get_post_custom_values($key));
$value = implode($values,', ');
echo "<div class='post-meta-row'><div class='post-meta-key'>$key:</div><div class='post-meta-value'>$value</div></div>\n";
}
echo "</div>\n";
}
}
And this for your CSS:
.post-meta-table { display: table; }
.post-meta-row {
display: table-row;
}
.post-meta-key,
.post-meta-value {
display: table-cell;
padding: 0 0 10px;
}
.post-meta-key {
font-size: 110%;
font-weight: bold;
width: 200px;
}
.post-meta-value {
color: blue;
text-align: left;
width: 400px;
}
Thanks vtxyzzy
That has worked perfectly. I was almost there using floats and hadn’t thought about using tables.
Cheers
Mick