ala888 Posted July 17, 2014 Share Posted July 17, 2014 So basically, Im trying to put a video file of variable size, both width and height, smack dab center of a page. The current code I have is .vid {position:absolute; top:0px bottom:0px; left:0px; right:0px; } however, I have some other content at the top of the screen that might be potentially blocked by this approach.Is there any other method to center a video file without restricting its width/height, but at the same time force it to not infringe upon the space of other elements? Link to comment Share on other sites More sharing options...
niche Posted July 17, 2014 Share Posted July 17, 2014 Use float http://www.w3schools.com/cssref/pr_class_float.asp Link to comment Share on other sites More sharing options...
davej Posted July 17, 2014 Share Posted July 17, 2014 You want to re-size the video? You can't center the video and also guarantee that the items at the top will be visible. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 17, 2014 Share Posted July 17, 2014 This does not give as match to work with? 1) what does .vid relate to? <video> tag using position absolute top:0 yada yada yada would stretch to first parent element using position: relative, else browser window. SO is this a full screen video display. 2) you could just use z-index with 0 value to place it behind the content using position: relative; with z-index: level higher. 3) other option is look up highslide, which give you jquery pop ups to show images, videos, html. Link to comment Share on other sites More sharing options...
ala888 Posted July 18, 2014 Author Share Posted July 18, 2014 thanks, Ill go with the highslide Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now