SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Urgent Problem needs fixing

    Ok, I have a search box on a page that is not showing very well as the button is not lined up with the text box, you can see what I mean here.



    I have worked out how to fix this using a small table, here is the code
    PHP Code:
     <?php echo tep_draw_form('quick_find'tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT'''NONSSL'false), 'get'); ?>
                      <table border="0" cellspacing="0" cellpadding="0">
                          <td align="center"><?php echo ''?></td>
                          <td align="center"><?php echo tep_draw_input_field('keywords''''size="10" maxlength="30" style="width: 75px"') . tep_hide_session_id(); ?></td>&nbsp
                          <td align="center"><?php echo tep_image_submit('button_quick_find.jpg'BOX_HEADING_SEARCH); ?></td>
                         </table>
                         </form>
    Now the problem is the page this is going into has been nearly completely built using css. The code below is where the search box is to go, but if i insert the table as HTMl like above, it throws all the alignment and everything out on the rest of the page.

    Code:
    	   
    	</td>
       <td valign="top" id="main">
    <!-- content //-->
    	   <div class="greeting"><?php echo tep_customer_greeting(); ?></div>
    	
       <div id="mainbg">
    <SEARCH BOX CODE HERE
    	 </div>
    The CSS styles for above are
    Code:
     #main {
    	background: url('images/mainbg.jpg') no-repeat left top;
    }
     
    #mainbg {
    
     padding: 5px 0px 100px 10px;
     
    }
    So if that is clear enough, can anyone help me turn the HTMl table above into some nice code using css that wont screw up my page??
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info

  2. #2
    SitePoint Enthusiast Gamblingharry's Avatar
    Join Date
    Apr 2003
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The way I would do it is to edit the bottom margin of one of them.

  3. #3
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HOw ??

    If anyone can help out with this, there is cash available. I need it fixed asap, as my CSS man has let me down, he has left the job half finished.
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info

  4. #4
    SitePoint Enthusiast Gamblingharry's Avatar
    Join Date
    Apr 2003
    Location
    UK
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    put your submit button inside this
    HTML Code:
    <span style="margin-bottom:-4px;"> "Submit button code" </span>
    You might need to adjust the -4 value to get it perfect.
    How much cash huh??

    Oh also just noticed your table doesnt have any <tr>, </tr> tags! That might be why it messed up. Oh, and you have a &nbsp at the end of the long line above, its not in any <tr><td> tags so that wont be good.

  5. #5
    SitePoint Member
    Join Date
    Oct 2003
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi there

    i suggest you split the code into two cells, ie put the text box in one td and the search image in another td ...

    example code :
    <td ><input type="text" name="search"></td>
    <td><input name="imageField" type="image" src="go.gif" width="21" height="15" border="0"></td>



    let me know if this helps :-)

    regards
    sanjay

    Last edited by Paul O'B; Oct 17, 2007 at 01:30. Reason: links ony allowed in signature

  6. #6
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sanju_june
    hi there

    i suggest you split the code into two cells, ie put the text box in one td and the search image in another td ...

    example code :
    <td ><input type="text" name="search"></td>
    <td><input name="imageField" type="image" src="go.gif" width="21" height="15" border="0"></td>
    This is the method I use in these situations but I think he wants it done in css.
    Community Guidelines | Community FAQ

    "He that is kind is free, though he is a slave;
    he that is evil is a slave, though he be a king." - St. Augustine

  7. #7
    eCommerce specialist hotnuts21's Avatar
    Join Date
    Apr 2002
    Location
    Aberystwyth, UK
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    None of them worked either

    The code i posted at the top does work, but because its a table within CSS code, it just screws up the whole code.

    As I said there is some cash available, if you are good with CSS, email me, its probably a 5 second job once you see the problem, and i need this fixed asap.
    Search & Rescue Aberystwyth Lifeboat
    CSS Tutorials/Guides

    Sitepoint signatures are not visible to Search Engines More info

  8. #8
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,340
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I'm afraid I don't understand the PHP but have you simply tried.
    Code:
    input {vertical-align:middle}
    Code:
       <div id="mainbg">
    <p><input type="text" size="10" maxlength="30" style="width: 75px" /><input type="submit" />
    </p>
      </div>
    It would be easier if you showed us the code that appears once the php has been parsed so I can see what's supposed to be happening. Do you have a link to the page?

    As I said I only have a basic understanding of PHP so I may be wide of the mark here .

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •