SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict JerXs's Avatar
    Join Date
    Nov 2005
    Location
    Wilkes-Barre, PA
    Posts
    347
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Floating content / adds "wordpress"

    I am in the process of launching a blog for my website. I am trying to float adsense ads within posts, im using a plugin "adsense-delux" to manage the ads.

    so I tryed wrapping the adds in a div.... <div class="120x240"><!--adsense#120x240--></div>

    then I proceeded to the style.css file under the default layout and added the folowing CSS..
    #120x240 {
    float: left;
    }

    Which should float the add to the left, but doesnt,

    what am I doing wrong? there are alot of diffrent files included in the word press directory am I editing the wrong one?

    Any help would be great.

    Thank you, Jer

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    #a120-240 {float: left;} ID

    .a120-240 {float: left;} class

    and maybe give the div a width and height of ad

  3. #3
    SitePoint Addict JerXs's Avatar
    Join Date
    Nov 2005
    Location
    Wilkes-Barre, PA
    Posts
    347
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you,
    Why would the class or id #120x240 work? #120-240 works just fine!

    Thanks again, Jer

  4. #4
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    <div class="120x240"> class

    #120x240{ ID they dont mix

    #120x240 or .120x240 invalid css code
    ID selectors should begin with a letter and contain only letters (A-Z, a-z), numbers (0-9), and the hyphen character (-). The CSS2 specification allows more (such as escaped characters) but these are not recommended due to style and compatibility reasons.

  5. #5
    SitePoint Zealot marbly's Avatar
    Join Date
    Nov 2005
    Location
    Croatia
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    id or class name must never start with a number

  6. #6
    SitePoint Addict JerXs's Avatar
    Join Date
    Nov 2005
    Location
    Wilkes-Barre, PA
    Posts
    347
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im Still learning new stuff everyday, I had no idea that a class or ID could not start with a number.

    Thanks for the help.


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
  •