minimum object width and high? that even possible?

Discussion in 'CSS' started by stuuntn, Aug 8, 2010.

  1. #1
    Hello! I've only started learning css a few months ago and have most of it down except the tricky stuff. I'm trying to figure out if its possible to set a minimum width and height of an object that would be places inside a div. i have a video website and doing some adjustments to it. every video on my site is 588px in width and random heights according to the video's aspect ratio. is it possible to set up a div so that any video thats placed inside the div will be resized to certain width/height regardless of the size the <object> is already set to? lets say i want the video width to be 650px width and 450px in height. i have over 4,000 videos so editing each one individually isn't anything im up for.

    here is what i want to do: i want to build a div that automatically makes any video/object inside that div a set width and height. is it possible? if so.. pls hellllp!

    any help would be greatly appreciated!
     
    stuuntn, Aug 8, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    As per my understanding, a div will act as an container to <object> and as you said object tag allready has height and width mentioned, therefor the videos will have the height and width mentioned for the object div and doesn't matter on the height and width mentioned for the div.

    I guesst, using javascript can give you some relief. javascript could overwrite the object properties of the page. A somewhat logic like this

    if object width = 200px & height=300px
    then
    do this.

    However I'm not a flash or Javascript expert either, otherwise I could've looked into this.

    Good luck to you, i'm sure someone will be able to help you.
     
    radiant_luv, Aug 8, 2010 IP
  3. stuuntn

    stuuntn Member

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #3
    yes i see what you're saying and i am aware that a div would just act as a container.. but i dont know everything there is to know about CSS so i was hoping someone could fill me in. I appreciate your response, radiant_luv! ill figure it out sometime but for now ill just keep searching. cheers!
     
    stuuntn, Aug 9, 2010 IP
  4. ajomehri

    ajomehri Active Member

    Messages:
    212
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #4
    very nice question , i want to know too , subscribed to thread
    ----------------------
    personally i think CSS can do no more than HTML , therefore it's unable to do such resizing without JS
     
    ajomehri, Aug 9, 2010 IP
  5. stuuntn

    stuuntn Member

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #5
    well atleast now i know it takes JS to do something like this ^_^ theres a start
     
    stuuntn, Aug 10, 2010 IP