navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Free FrontPage Templates

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

This Canadian is confused, and feeling dumb with this CSS page

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> This Canadian is confused, and feeling dumb with this CSS page
Page: [1]
 
kenwvs

 

Posts: 7
Joined: 6/30/2006
Status: offline

 
This Canadian is confused, and feeling dumb with this C... - 7/18/2006 19:16:13   
I had a person help me out with a form that needed to be combined with some PHP code. When he got the form, it was in straight HTML (that is all I know) and have multiple fields on one line. He prefers to read things down a page, not across, so when I got it back, there was one field per line (row) which doesn't suit me for this purpose. The problem is that he has used CSS and I don't understand or know it at all (however, I can see I need to catch up on the times) and now I am having a heck of a time getting more than one field on a line, and have it line up like I want. It is set up so that it keeps the rows all nice an neat, but I need to be able to move it around, and have 2 fields on one row, and 6 on another, but it is spreading it all out.

Can someone explain the benefits of CSS to me, and also help me by telling me if this is going to be very hard to change.....

EDIT: Skip the benefits of CSS, I just found a tutorial that I will go through and then will understand it all.

here is the code for the form...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
<title>For Sale 4 U QUICK LISTER</title>
<style type="text/css">
body {
        background-color: Gainsboro;
        margin: 0;
        padding: 0;
        font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
        font-size: 72%;
        color: black;
}
table {
        width: 96%;
        display: block;
        margin-left: auto;
        margin-right: auto;
}

form {
        width: 98%;
        display: block;
        margin-left: auto;
        margin-right: auto;
}
.red {
        color: Red;
}
.error {color:#C03; font-weight:bold; }

h3 {
        text-align: center;
        color: Red;
        font-weight: bold;
}
h4 {
        text-align: center;
        color: Blue;
        font-weight: bold;
}
 .center {
         text-align: center;
 }

 .bold {
         font-weight: bold;
 }
</style>
</head>
<body>
<h3>Quick Lister</h3>
<p class="center"><span class="red">For Sale 4 U - Canada's Online Auction</span></p>
<p class="center"><span class="bold">Please note:  </span>You may
not use characters such as $, #, ", &, *,/, etc.  It is best to use normal
text and numerical characters only. <BR><BR><BR>
<?php
$trace = array();
if (!$valid) {
?>
<h4>Please correct the items in <span class="error">red</span> and resubmit.<br /><br /> </h4>
<?php
}
?>
<HR>
<form method="POST" action="sample.php">
<table>

    <td valign="top" <?php if(in_array('id',$err)) echo 'class="error"'; ?>> User ID:</td>
    <td><input type="text" name="id" size="12" value="<?php echo  disp_val('id') ?>">
    You must use the <span class="bold">same User ID</span> for all items you are uploading during this session.(It does not have to be your regular username.)</td>
</tr>
<tr>
    <td <?php if(in_array('item_title',$err)) echo 'class="error"'; ?>>  Item Title:</td>
    <td><input type="text" name="item_title" size="60" value="<?php echo  disp_val('item_title'); ?>"</td>

    <td <?php if(in_array('item_category',$err)) echo 'class="error"'; ?>>Item Category:</td>
    <td> <select size="1" name="item_category">
         <?php disp_options($categories,'item_category','',true) ?>
          </select>
          <? if (isset($err_msg['item_category'])) echo ' <span
          class="error">' . $err_msg['item_category'] . '</span>'; ?>
          </td></p>
</tr>
<tr>
    <td <?php if(in_array('item_type',$err)) echo 'class="error"'; ?>>Item Type:</td>
    <td><select size="1" name="item_type">
         <?php
                         $tmp = array();
                        for ($i=1;$i<count($itemType)+1;$i++)
                                $tmp[] = '<option value="' . $i . '"' . is_selected('item_type',$i,0) . '>' . $itemType[$i] . '</option>';
                        echo "\t\t" . implode("\n\t\t",$tmp) . "\n";
        ?>
    </td></select>
<td <?php if(in_array('quantity_available',$err)) echo 'class="error"'; ?>>Quantity:</td>
    <td><input type="text" name="quantity_available" size="3" value="<?php echo  disp_val('quantity_available') ?>"</td></tr>

    <td <?php if(in_array('starting_bid',$err)) echo 'class="error"'; ?>>Starting Bid:</td>
    <td> <input type="text" name="starting_bid" size="7" value="<?php echo  disp_val('starting_bid') ?>"></td>
</tr>
<tr>
    <td <?php if(in_array('bid_increment',$err)) echo 'class="error"'; ?>>Bid Increment (auction only):</td>
    <td><input type="text" name="bid_increment" size="7" value="<?php echo  disp_val('bid_increment') ?>"><? if (isset($err_msg['bid_increment'])) echo ' <span class="error">' . $err_msg['bid_increment'] . '</span>'; ?></td>
</tr>
<tr>
    <td <?php if(in_array('reserve_price',$err)) echo 'class="error"'; ?>>Reserve Bid (auction only ):</td>
    <td><input type="text" name="reserve_price" size="7" value="<?php echo  disp_val('reserve_price') ?>"><? if (isset($err_msg['reserve_price'])) echo ' <span class="error">' . $err_msg['reserve_price'] . '</span>'; ?></td>
</tr>
<tr>
    <td <?php if(in_array('duration',$err)) echo 'class="error"'; ?>>Ad Duration:</td>
    <td><select size="1" name="duration">
         <?php $tmp = array();
                 for ($d=1;$d<31;$d++)
                         $tmp[] = '<option value="' . $d . '"' . is_selected('duration',$d,'14') .'>' . $d . '</option>';
                echo "\t\t" . implode("\n\t\t",$tmp) . "\n";
                ?>
         </select>
    </td>
</tr>
<tr>
    <td <?php if(in_array('end_hour',$err)) echo 'class="error"'; ?>>End Time:</td>
    <td> <select size="1" name="end_hour">
         <?php disp_options($hours,'end_hour',20,true); ?>
        </select>
    </td>
</tr>
    <tr><td <?php if(in_array('auto_relist',$err)) echo 'class="error"'; ?>>Auto Relist:</td>
    <td><select size="1" name="auto_relist">
         <?php disp_options($yesno,'auto_relist',1,true); ?>
         </select>
    </td>
</tr>
<tr>
    <td <?php if(in_array('city',$err)) echo 'class="error"'; ?>>City:</td>
    <td><input type="text" name="city" size="15" value="<?php echo  disp_val('city') ?>"> </td>
</tr>
<tr>
    <td <?php if(in_array('state',$err)) echo 'class="error"'; ?>>Province/State:</td>
    <td><input type="text" name="state" size="10" value="<?php echo  disp_val('state') ?>"></td>
</tr>
<tr>
    <td <?php if(in_array('country',$err)) echo 'class="error"'; ?>>Country:</td>
    <td><select size="1" name="country">
                 <?php disp_options($countries,'country',32,true) ?>
                </select>
    </td>
</tr>
<tr>
    <td valign="top" <?php if(in_array('item_description',$err)) echo 'class="error"'; ?>>Item Description:</td>
    <td colspan=8><textarea rows="4" name="item_description" cols="116"><?php echo  disp_val('item_description') ?></textarea></td>
</tr>
<tr>
       <td <?php if(in_array('paypal_id',$err)) echo 'class="error"'; ?>>Paypal ID (Optional):</td>
                 <td><input type="text" name="paypal_id" size="25" value="<?php echo  disp_val('paypal_id') ?>">
</tr>
<tr>
       <td <?php if(in_array('hit_counter',$err)) echo 'class="error"'; ?>>Hit Counter:</td>
                 <td><select size="1" name="hit_counter">
                 <?php disp_options($hc,'hit_counter',0,true); ?>
        </select>
    </td>
</tr>
</tr>
        <td colspan="2"><hr></td>
<tr>
<tr>
    <td colspan="5" class="center">
        <span class="bold"><br>Please verify all details shown for your item before pressing the SAVE button.</span>
    </td>
</tr>
<tr>
    <td colspan="5" class="center"><br><input type="submit" name="Submit" value="SAVE  ITEM"></td>
</tr>
<tr>
    <td colspan="2" class="center"><BR>You will be guided through this Multi Step Process.  Please be sure
        to use the <span class="bold">same User ID</span> when entering your items or they will not all
        be listed correctly.</font></p>
    </td>
</tr>
</table>
</form>
</body>
</html>



< Message edited by jaybee -- 7/20/2006 19:17:58 >
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: This Canadian is confused, and feeling dumb with th... - 7/20/2006 19:20:10   
You need to think tables not css. What he's done is laid the form out so that each element is in a separate table cell/row although he is using css to style the table as a block.

He's also using PHP to do all the validations so be careful what you change.

< Message edited by jaybee -- 7/20/2006 19:26:38 >


_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to kenwvs)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: This Canadian is confused, and feeling dumb with th... - 7/20/2006 20:23:54   
Most of the php code is contained within legal html tags, so I would think a wysiwyg editor woud be quite capable of manipulating the table to suit your needs (keep backups obviously!)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to jaybee)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> This Canadian is confused, and feeling dumb with this CSS page
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts