Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Posts
    175
    Plugin Contributions
    0

    Default Help with CSS border around Description

    Hi guys,

    I wonder if someone could help me with this border around the description on the product page. It seems the border will not collapse around the description itself leaving it to melt into the main image to the left.

    See screen shot :

    I have marked where the border continues and ends. Can some help me with this. I know there is something I should probably be adding to this: maybe collapse border? But Im not sure. Thanks in advance.

    #productDescription {
    /*font-size: 1.2em;*/
    padding: 0em;
    text-align: left;
    border-style: inset;
    }
    [FONT="Comic Sans MS"]Red[/FONT]

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Help with CSS border around Description

    It is because the image is floated left. So, the text is pushed left to avoid it but the border still stays the same shape. Why? because the css pixies say so.

    You can work around it by adding a left margin to the description which matches the width of the image.

    Actually a good way of understanding why is to imagine that the text is much longer and extends beneath the image. It would wrap under the image and be full width. (This is an ugly problem on some sites that can be remedied with a left margin). So the width of the text element is actually the full width. So the border is full width.

  3. #3
    Join Date
    Oct 2006
    Posts
    175
    Plugin Contributions
    0

    Default Re: Help with CSS border around Description

    Thank you so much for your reply. I have been playing around with the code and implemented your suggestion. We have set the margins at a largest possible width of the largest image ( as some images are different sizes in width). I was wondering if there is a better way to handle this since their product images are very random. Does this require a heavily modified theme to get this to align?

    Thank you!!
    Red
    [FONT="Comic Sans MS"]Red[/FONT]

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Help with CSS border around Description

    Is your layout fixed width or fluid?

  5. #5
    Join Date
    Oct 2006
    Posts
    175
    Plugin Contributions
    0

    Default Re: Help with CSS border around Description

    Her layout is a fixed width.
    [FONT="Comic Sans MS"]Red[/FONT]

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Help with CSS border around Description

    There are some product info page layout mods in Free Addons that have various arrangements of elements, and one of them might be a good base to get your page the way you want it.

 

 

Similar Threads

  1. remove border around around images (not image border)
    By Otha in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 23 Aug 2010, 06:03 AM
  2. Help with border, not wrapping around body
    By MongkongClothing in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 3 Apr 2009, 12:49 AM
  3. I want a 2px border around each item and their description
    By triplemoonranch in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 22 Feb 2008, 01:57 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