I'm a CSS dummy; what part of this code resizes pictures?

Discussion in 'Web Design & Coding' started by Petros, Apr 17, 2007.

  1. Petros

    Petros Thief IV

    Messages:
    3,038
    Location:
    Pacific Northwest
    I like my Myspace layout to look a certain way, but people sometimes post gigantic pictures that go beyond the borders and screw up the symmetry of my whole page.

    Is there some code I could add that would reduce the size of oversized pictures, or just resize any posted picture to a certain size?

    EDIT: Woot nevermind. For anyone that needs it:

    Code:
    <style type="text/css"> td.text td.text table table table td a img {width:100px;} td.text td.text table table table td div img {width:80px;} td.text td.text table table td img {width:260px; max-width:260px; width:auto;} td.text td.text table table td div img {width:80px;} * html td.text td.text table table td img {width:260px;} * html td.text td.text table table td a img {width:90px;} * html td.text td.text table table td div img {width:80px;} </style> 
    Can I request a mod to change the title to "Myspace code to resize comment images" or something to that effect?
     
    Last edited: Apr 17, 2007
  2. fitz

    fitz Just Floating Along Staff Member Political User Folding Team

    Messages:
    4,076
    Location:
    Chicagoland
    Hey Petros.. glad you got it sorted.. couple comments/suggestions:

    First: Clean up your code to make it more readable (hint: linebreaks and tabs are a start :p )

    Second: As far as I can tell, you have a bunch of crap that while it may do what you want isn't really what you want in your style sheet as it looks like you are redefing styles for the same tags multiple times

    Third: Don't just take code others have written without knowing what it really does (I'm assuming you copied and pasted this code from someone/somewhere else). It's dangerous if you don't know what each line does.
     
    Petros likes this.