Results 1 to 9 of 9

Thread: Addressing individual images with CSS

  1. #1
    OMG!! PWND!!
    Join Date
    Dec 2003
    Location
    In front of computer
    Posts
    964
    Thanks
    0
    Thanked
    0 times in 0 posts

    Addressing individual images with CSS

    As the title says, how do i identify an individual image with Style sheets? Im kinda new to the whole css thing, but i need one of my pics to be width and height at 80% while the rest are normal...

    ohh, also, what is the alignment thing, like text-align, for images?

  2. #2
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts
    www.w3schools.com

    Give the image an id. In the stylesheet do (i think) #img .myimage { whatever here }

    Then, in the img tag, do class="myimage". That way the stylesheet will know it's an image of that id.

  3. #3
    OMG!! PWND!!
    Join Date
    Dec 2003
    Location
    In front of computer
    Posts
    964
    Thanks
    0
    Thanked
    0 times in 0 posts
    ahhh, ty

  4. #4
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    you won't be able to align the image unless you wrap it in a div tag (I don't think).

  5. #5
    Sublime HEXUS.net
    Join Date
    Jul 2003
    Location
    The Void.. Floating
    Posts
    11,819
    Thanks
    213
    Thanked
    233 times in 160 posts
    • Stoo's system
      • Motherboard:
      • Mac Pro
      • CPU:
      • 2*Xeon 5450 @ 2.8GHz, 12MB Cache
      • Memory:
      • 32GB 1600MHz FBDIMM
      • Storage:
      • ~ 2.5TB + 4TB external array
      • Graphics card(s):
      • ATI Radeon HD 4870
      • Case:
      • Mac Pro
      • Operating System:
      • OS X 10.7
      • Monitor(s):
      • 24" Samsung 244T Black
      • Internet:
      • Zen Max Pro
    correct
    (\__/)
    (='.'=)
    (")_(")

  6. #6
    OMG!! PWND!!
    Join Date
    Dec 2003
    Location
    In front of computer
    Posts
    964
    Thanks
    0
    Thanked
    0 times in 0 posts
    Yeah, i figured that bit out after about an hour of stuffing around...

    ty anyway

  7. #7
    Senior Member GAteKeeper's Avatar
    Join Date
    Feb 2004
    Location
    Derbyshire, UK
    Posts
    582
    Thanks
    14
    Thanked
    28 times in 22 posts
    • GAteKeeper's system
      • Motherboard:
      • MSI P67-GD5
      • CPU:
      • Intel i7 2600k
      • Memory:
      • 8Gb Corsair DDR3 1600
      • Storage:
      • ~44TB
      • Graphics card(s):
      • 980Ti
      • PSU:
      • Seasonic S12 600W
      • Case:
      • Lian Li PC-65
      • Operating System:
      • Win10 64bit
      • Monitor(s):
      • Dell U3415W & 2405fpw
      • Internet:
      • 45Mb vDSL
    Stylesheets promise sooo much and on the surface deliver but they will cause premature baldness and loss of sleep.

    Just wait till you open it in a standards compliant browser!!!

    GAteKeeper
    Keeper of the Gates of Hell

  8. #8
    Ah, Mrs. Peel! mike_w's Avatar
    Join Date
    Oct 2003
    Location
    Hertfordshire, England
    Posts
    3,326
    Thanks
    3
    Thanked
    9 times in 7 posts
    Quote Originally Posted by GAteKeeper
    Stylesheets promise sooo much and on the surface deliver but they will cause premature baldness and loss of sleep.
    I would argue that it is not CSS that causes baldness or loss of sleep, but Internet Explorer's lack of compliance - but that's another topic!
    "Well, there was your Uncle Tiberius who died wrapped in cabbage leaves but we assumed that was a freak accident."

  9. #9
    Flak Monkey! Dorza's Avatar
    Join Date
    Jul 2003
    Location
    UK - South Wales
    Posts
    1,762
    Thanks
    34
    Thanked
    17 times in 15 posts
    • Dorza's system
      • Motherboard:
      • Asus P5B Deluxe - WiFi
      • CPU:
      • Q6600 @ 3.06Ghz
      • Memory:
      • 2GB Crucial
      • Storage:
      • 500GB Samsung SpinPoint
      • Graphics card(s):
      • Geforce 9600GT
      • PSU:
      • Cosair HX520W
      • Case:
      • LianLi something something or other
      • Monitor(s):
      • Eizo FlexScan S1910 (1280*1024)
      • Internet:
      • 2mb Virgin (when they want to give me that: else 1mb)
    Quote Originally Posted by mike_w
    I would argue that it is not CSS that causes baldness or loss of sleep, but Internet Explorer's lack of compliance - but that's another topic!
    Id agree. In my view all browsers every where should use the exact same basic model of how to interpret css, that being the way the W3C wishes it to be implemented. We wouldn't have these time wasting and down right frustrating problems then. Although i have to say i havent had that many issues. initially when i first started to use CSS i have loads of problems in IE but not too many now thank god.

    There we go, said my bit lets get back OT since i did go off it a bit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CSS presentation in FF and IE
    By ikonia in forum Software
    Replies: 10
    Last Post: 30-01-2005, 06:41 PM
  2. divs and CSS
    By Kezzer in forum Software
    Replies: 11
    Last Post: 18-11-2003, 12:51 PM
  3. CSS + Other Language Questions
    By Jonny M in forum Software
    Replies: 7
    Last Post: 11-10-2003, 11:17 PM
  4. CSS Help
    By Basher in forum Software
    Replies: 19
    Last Post: 10-09-2003, 08:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •