CSS Stylesheet help - Wordpress 2.3 - Centering Form

Discussion in 'CSS' started by bluemanteam, Dec 13, 2007.

  1. #1
    In my wordpress header.php file I have added the following code:

    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    Within style.css, I have added the following:

    .search-form input {
    width: 300px;
    }

    I had 2 questions:

    1. How can I have it so that the search form is vertically centered and horizontally located on the right side of the header?

    2. Right now, the width is set to 300px. When I change this to another value, and refresh my blog, the width of the search form does not change. Is there an error with my syntax?

    Thank you
     
    bluemanteam, Dec 13, 2007 IP
  2. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #2
    Your question is useless unless you provide a link or full source code.
     
    soulscratch, Dec 13, 2007 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not necessarily soulscratch. What he's done is set the width of all input elements within that form to 300px (which will affect the submit button as well). What he NEEDS to do is position the container the form is in (I personally use a DIV container with an ID of "sidebar" but that's just me) relatively and then use absolute positioning and negative margins to center the form the way he wants, even though it will break the layout when the text is resized in the browser window.
     
    Dan Schulz, Dec 14, 2007 IP
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #4
    Yeah, but you never know what kinda styles he set and what's being inherited... which is why link/source is better than nothing and even if you tell him the basics of what he needs to do he'll probably still be stuck until someone sees his header styles and tells him exactly how to fit it.
     
    soulscratch, Dec 14, 2007 IP