Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2011
    Posts
    31
    Plugin Contributions
    0

    Default Where is element.style to edit? I used developers tool and looked everywhere lol

    I use "inspect element" on my webpage and then play with numbers in the popup to the right side.
    I needed more padding between some elements and put it in, and it was changed in element.style.
    These changes are temporary and are just for debugging or playing, so I need to find that element.style
    to make the change permanent.

    Any help would be appreciated ;)
    Thanks
    Nancy

    www.sacredcirclegifts.com

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Where is element.style to edit? I used developers tool and looked everywhere lol

    'Style' is used to add inline styling rather than using the stylesheet. I don't recommend doing so, but it appears Template Monster disagrees. We'll need to know exactly what you want to change, and how, to be of any help.

  3. #3
    Join Date
    Nov 2012
    Location
    Utrecht, Nederland
    Posts
    41
    Plugin Contributions
    0

    Default Re: Where is element.style to edit? I used developers tool and looked everywhere lol

    If you want to find something like a function or a styl or any word in the files of zencart, you can use the developer toolkit in the admin aria to search. You wil find it in the tool menu.

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Where is element.style to edit? I used developers tool and looked everywhere lol

    Quote Originally Posted by Laidlawgifts View Post
    I use "inspect element" on my webpage and then play with numbers in the popup to the right side.
    I needed more padding between some elements and put it in, and it was changed in element.style.
    These changes are temporary and are just for debugging or playing, so I need to find that element.style
    to make the change permanent.
    If the element.style you changed was already in the 'element.style' section at the top of the list of styles, it implies that the style value has been hardcoded into the page (aka, an inline style).

    If you *added* a style to this section, it means that you've added it to the wrong place.

    If it IS an an inline style, there are two ways to make it permanent.

    The 1st way is to use the developers toolkit and find where it has been hardcoded, and change to suit you needs.

    A *better* way (in my opinion) is to remove the hardcoding completely and create a class element so that you can make changes via the stylesheet(s).

    Example: (from your site)

    Code:
    <div class="product_list">
    <div class="left" style="width:330px">
    When looking at the elements, this will show as

    Code:
    element.style {
    width: 330px ;
    }
    .product_list   stylesheet_tm.css:117 
    .left {
    float:left; 
    position: relative;
    text-align: left :
    }
    So, if you want to change this width to 200px, you'll need to find the code that produces the inline
    Code:
     <div class="left" style="width:330px">
    and change it to
    Code:
     <div class="left" style="width:200px>
    OR, you can change it to
    Code:
     <div class="left">
    And then, in the stylesheet_tm.css in the section starting on line#177, add the width style so the .css reads:
    Code:
    .product_list .left {
    float:left; 
    position: relative;
    text-align: left :
    width: 200px ;
    }
    Most people tend to do the 'quick n dirty' method of changing the inline style, but moving it to the .css makes maintenance and further tweaking a lot easier.

    Cheers
    RodG

 

 

Similar Threads

  1. Background image...and yes I've looked EVERYWHERE
    By curbsidestudiosNET in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Feb 2011, 04:16 PM
  2. Looked Everywhere - Need help
    By jill8026 in forum General Questions
    Replies: 7
    Last Post: 19 Nov 2009, 11:59 AM
  3. Frsutrated - where is: Developers Tool Kit?
    By PharSide in forum General Questions
    Replies: 3
    Last Post: 9 Sep 2008, 11:45 PM
  4. I looked everywhere in my stylesheet and can't find it
    By GraniteMan44 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 11 Mar 2008, 04:13 AM
  5. Large Image troubles-and i have looked everywhere!
    By jill8026 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 25 Oct 2007, 03:37 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR