Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22304

    I’m trying to get a video to center on the home page of my site. Is there a code I can use to center it?

    http://realestatelistings-toronto.ca/

    Failing that, I’m trying to add some text as an image to the right of the video fill the white space. I’ve figured out how to do it, except that of course it shows on all pages. Is there a way to add an image as I’ve done only on one page (home page).

    The CSS I used is

    #main .container {

    background-image: url(http://realestatelistings-toronto.ca/wp-content/uploads/2013/04/Seving-Toronto-white.png);

    background-repeat: no-repeat;

    background-attachment: scroll;

    background-position: 95% 10%;

    background-color: #ffffff;

    Your assistance is greatly appreciated!

    #115335

    Hi achieve1,

    It looks like you’ve got it figured out when looking at your site live now :)

    Regards,

    Devin

    #115336

    Hi Devin,

    I did, but there’s a problem. All the other pages are affected with the same adjustment, meaning the slideshows on other pages are “pushed” to the right.

    I changed the padding-left. It seems I need a way to center the video on that page. Any suggestions would be greatly appreciated.

    —-

    Could you also tell me – using the code I posted in my original note above, how would you do that for only one page and not an entire site please?


    Thanks!

    #115337

    You can target any single page on your site by using its page id which is added as a class on that page. For the home, the class selector is .home so you could target the home page specifically with:

    #top.home #main .container {
    background-image: url(http://realestatelistings-toronto.ca/wp-content/uploads/2013/04/Seving-Toronto-white.png);
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: 95% 10%;
    background-color: #ffffff;
    }

    For another page you would do something like:

    #top.page-id-44 .someotherclass {
    color: #333;
    }

    where the page id for that specific page is 44.

    Regards,

    Devin

    #115338

    Thanks so much Devin, that helps a lot!!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Video / Fixed Image’ is closed to new replies.