Professional Web Applications Themes

applying code from stylesheet in style attribute - Macromedia Dynamic HTML

ok i have a div with css styling using the class attribute works fine. it references a class within a separate css stylesheet linked to the file, and all is well. now i want to change some of that information with ajax, so i need to take the code from the stylesheet and put in in the page itself. so i copy the code, and use the style attribute instead of class. makes sense to me, however i'm obviously the only one that makes sense to... it's all jacked up, not even close. how do i fix this? why is ...

  1. #1

    Default applying code from stylesheet in style attribute

    ok i have a div with css styling using the class attribute works fine. it
    references a class within a separate css stylesheet linked to the file, and all
    is well.

    now i want to change some of that information with ajax, so i need to take the
    code from the stylesheet and put in in the page itself. so i copy the code, and
    use the style attribute instead of class. makes sense to me, however i'm
    obviously the only one that makes sense to... it's all jacked up, not even
    close.

    how do i fix this? why is it different using the exact some code?

    here's my code using the class attribute...

    css -
    .leftEdge {background:#000000 url(whatever.gif) repeat-y left top}

    html-
    <div class="leftEdge">

    ...that works fine, why doesn't this....

    no css stylesheet

    html-
    <div style="background:#000000 url(whatever.gif) repeat-y left top">

    i even tried to label everything, using background-repeat and
    background-position... still a no go. please help



    NickTheNameless Guest

  2. #2

    Default Re: applying code from stylesheet in style attribute

    Did you try it like this?

    <div style="background-color:#000000; background-image:url(whatever.gif);
    background-repeat:repeat-y;">

    --
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com


    "NickTheNameless" <com> wrote in message
    news:fpnbhm$6us$macromedia.com... 

    Ken Guest

  3. #3

    Default Re: applying code from stylesheet in style attribute

    ..oO(NickTheNameless)
     

    It shouldn't.
     

    Can you post a URL to a test case? In which browser does this happen?

    Micha
    Michael Guest

Similar Threads

  1. How to fetch style information from mobile StyleSheet?
    By Jamie in forum ASP.NET Building Controls
    Replies: 0
    Last Post: January 10th, 01:06 PM
  2. Applying style only in Explorer
    By An-Droide in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: November 23rd, 04:48 PM
  3. applying style
    By in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: July 8th, 12:00 PM
  4. Applying a stylesheet when in Edit mode
    By Paul D. Fox in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: March 8th, 04:51 PM
  5. Need help applying a stylesheet to a pushbutton control in a datagrid
    By Tim Meagher in forum ASP.NET Data Grid Control
    Replies: 3
    Last Post: October 27th, 07:41 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139