Results 1 to 10 of 10

Thread: CSS code set up,can it be modified if so how ?

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default CSS code set up,can it be modified if so how ?

    Here is a page in question,
    http://www.ebay.co.uk/itm/MITSUBISHI.../161467008398?

    I pretty much use the same template all the time and just edit the links for the photos as and when i need to.
    At the top of the listing "between Paypal verified logos" there are two photos of a key remote.
    Towards the bottom of the listing "above & below important information about chips" there are also two photos.

    I am using Dreamweaver and to change the bottom two photos i simply click the photo i wish to replace,then delete the old link & paste the new link in the src box at the bottom of the Dreamweaver screen,This is quick & easy.

    This is not the same for when i wish to replace the top two photos,mainly because they have a hover over action on the ebay site & the setup code is different etc.

    When i edit in Dreamweaver i need to first find the code,delete it using backspace etc for a while & then paste the new code.
    This is now "after a year or two" a timely exercise.

    So to cap it all,can the code be changed so editing the top photos are the same as how i edit the bottom photos with regards to the src box.
    If so please can you advise so i can make the changes & make things a little quicker to edit the photos in the future.

    Many thanks.

  2. #2
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    66 views and no reply.

    I think cotehead did the original ?

  3. #3
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    I have now changed the code but could you check something for me please.

    Here is the page in question.
    http://www.ebay.co.uk/itm/TOYOTA-SMA.../161467043236?

    When i update the two images at the top which show B51EA on them they are shown at 640 x 480.
    I need to then edit the width & height in the code to 40% each time.
    This happens every time i replace the image.
    Could you advise please why this happens & advice how i can just update the image & the code stays at 40% as opposed to changing each time.

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    The easiest way would be to edit the code in a plain text editor - the basic Notepad on a Windows computer would be fine for that.

    Unfortunately it sounds like Dreamweaver is modifying other elements of the code when you use the visual drag and drop interface, so there's not much can be done about that except trying to not use it. But Im no Dreamweaver expert so for advice about Dreamweaver behaviour, maybe you could ask for help in a Dreamweaver focussed help forum?

    I suspect that no one has replied because the active members do not use website builders. We're more the "code it yourself" types, who use text editors.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  5. #5
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    ok
    Thanks for the reply.
    I think i will get deeper in trouble if i go that way.

  6. #6
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    This simple code sorted it

    .imagesize img{
    width:40%; !important

  7. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    The semi-colon should be after !important
    Code:
    .imagesize img {
    width:40% !important;
    }
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  8. #8
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    For my learning curver why would that make a difference ?3

  9. #9
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Because css declarations are separated with a semi-colon, so the correct syntax is
    Code:
    selector { property:value; property:value }
    !important gives greater emphasis to the declaration it is part of, so you need to enclose it inside the actual declaration (before the semi-colon that indicates the next property:value; pairing).
    Code:
    p { color:red !important; line-height:1.75 }
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  10. #10
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    .imagesize img {
    width:40% !important;
    }

    So i will now change it with what you have suggested.

Similar Threads

  1. Modified a script and want to share
    By setishock in forum The lounge
    Replies: 0
    Last Post: 12-16-2011, 11:20 PM
  2. menucontents.js Modified, not working
    By earlp in forum JavaScript
    Replies: 1
    Last Post: 06-23-2009, 05:38 PM
  3. Modified LightBox for Youtube
    By Crimsonbat in forum JavaScript
    Replies: 0
    Last Post: 09-14-2006, 12:15 PM
  4. Contractible Headers - modified
    By amyth77 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 06-21-2006, 12:15 PM
  5. Modified snow code...
    By cgrl in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 01-16-2005, 10:02 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
  •