Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Posts
    49
    Plugin Contributions
    0

    Default Move 'in stock' element in css sheet

    Hi guys,

    I have moved my 'in stock status' and 'add to cart' element from the bottom of the product page to the top, and I have added the code:

    #productDetailsList{
    float: right;
    }

    to my .css as I want the 'in stock' status to sit right under the 'add to cart' box.

    The problem is that the 'in stock' element is quite long so the the text actually sits closer to the middle of the page rather than under the 'add to cart' element.

    I've tried playing around with the width of the element by adding the code such as:

    #productDetailsList{
    float: right;
    width:100px
    }

    But is doesn't quite give me the result I want. I'm pretty new to coding, I've never had any official training. Can someone explain how to get the result I want, and where these elemants get their height and width attributes from?

    Here's a link to one of my products:

    http://www.nintendoparts.com.au/ds-lite-screens-c-2_5/ds-lite-top-lcd-screen-p-1?zenid=jclc3n50aidv17mvrmn0ma9e06

  2. #2
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Move 'in stock' element in css sheet

    Your 'in stock' is being controlled by text-align left from your main wrapper css. If you add a text-align: right to your new div it will move it over.

  3. #3
    Join Date
    Jul 2010
    Posts
    49
    Plugin Contributions
    0

    Default Re: Move 'in stock' element in css sheet

    Thanks for the reply, that worked but didn't give me the exact result I'm after.

    I have included screen shots of what has happened and what I'm after. Ideally I would be able to make the #productDetailsList div the same width as the #cartAdd div, float the div to the right and then have the text aligned to the left within he div. I have highlighted the #productDetailsList div with firebug so you can see the width of the div and see what I'm after.


 

 

Similar Threads

  1. CSS element issue
    By fsicody in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Feb 2009, 03:40 PM
  2. Can't find this in my CSS sheet...
    By Brian Flanagan in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Feb 2008, 12:41 PM
  3. CSS Element for Add to Cart CSS button?
    By modernm in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Jan 2008, 04:54 PM
  4. importing stock from an excel spread sheet
    By jimbob202002 in forum General Questions
    Replies: 1
    Last Post: 17 Sep 2007, 11:34 AM
  5. element.style mystery css
    By wasana in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Jul 2007, 04:11 PM

Posting Permissions

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