PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > macromedia.dyna.html > applying code from stylesheet in style attribute
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
applying code from stylesheet in style attribute

Réponse
 
LinkBack Outils de la discussion
Vieux 22/02/2008, 20h32   #1 (permalink)
NickTheNameless
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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



  Réponse avec citation
Vieux 23/02/2008, 15h21   #2 (permalink)
Ken Ford - *ACE*
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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" <webforumsuser@macromedia.com> wrote in message
news:fpnbhm$6us$1@forums.macromedia.com...
> 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
>
>
>


  Réponse avec citation
Vieux 23/02/2008, 15h27   #3 (permalink)
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: applying code from stylesheet in style attribute

..oO(NickTheNameless)

>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?


It shouldn't.

> 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


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

Micha
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 15h42.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08584 seconds with 11 queries