-
AuthorPosts
-
August 19, 2014 at 9:24 am #87642
Hi Guys,
I would like to add div id = customdivID to my custom CSS one my home page ONLY, not entire page, how do add in the css?
Thanks.
August 19, 2014 at 9:49 am #87676Hi Rice,
For home page, follow the example:
.home .class { css: property; }
For other pages, find the page ID first from the address bar of the browser:
or from page source (Key: CTRL+U/CMD+U):
The add CSS as like the following:
.page-id-3037 .class { css: property; }
Hope this helps, Cheers!
August 20, 2014 at 6:30 pm #88832.home .class {
css: property;
}Qns1)
So if I wish put to an div id=”backtotop” on the body container , my own custom /#top instead of the default. How do I do that?Qns2) by assign an ID to body container, if i hashtag call the ID, it will go to the top, like /#top, right?
August 20, 2014 at 6:30 pm #88834it would be great if you answer like 1) xxx, 2) xxx so its easier to follow! thanks 🙂
August 20, 2014 at 6:34 pm #88837I’m referring to this, https://www.dropbox.com/s/7pmczer7rqs2c9f/custom%20css-homepage.png just in case there is some wrong assumption.
August 20, 2014 at 7:13 pm #88849Hey Rice,
1. You cannot add an ID to the body and can’t use the ID #top because it is already applied to the main site container.
2. Yes, you’re correct.
Can you give us more details on what you’re trying to achieve for us to determine if there is a solution?
Thanks.
August 21, 2014 at 2:46 am #89086Okay I’m aware of it.
But I would like to assign my own custom ID like #customID to the main body container, please you let me know how to do it? the entire body container is assign to an #customID, like #middlebody1, #service etc.
.home .class { css: property; }
August 21, 2014 at 3:12 am #89095Please modify _header.php located in wp-content\themes\x\framework\views\global. If you’re using a child theme, copy the modified file in the same directory in your child theme’s folder.
Thanks.
June 12, 2015 at 7:12 pm #300396Can you please tell me what I did incorrectly?
Code added to style.css of child theme:
.page-id-1428 .class .entry-wrap { background-color: #ffffff; }
(page: https://www.funnydummy.com/motivational-speaker/ )
Thank you!
June 13, 2015 at 7:50 am #300776You don’t need to include
.class
to the CSS code, the correct CSS code should be:.page-id-1428 .entry-wrap { background-color: #ffffff; }
Hope it helps.
October 2, 2015 at 2:25 am #607676Hi there,
I’m trying to add a CSS style through the Customiser to 1 page but I can’t get it to limit to the one page.
I want to add the following styles to only the News (Blog) page (who’s page id=13). It works without the “.page-id-13” part but applies it to the whole site, then doesn’t work when I add the page id part.
.page-id-13 .x-main.full { padding-left: 45px; padding-right: 45px; padding-top: 45px; padding-bottom: 45px; background-color: white; }
Is there anything wrong with the code that you can see?
October 2, 2015 at 2:33 am #607686Hi,
Thanks for writing in!
Your code is correct but you might have added the wrong page id.
You can try this instead.
.blog .x-main.full { padding-left: 45px; padding-right: 45px; padding-top: 45px; padding-bottom: 45px; background-color: white; }
If that doesn’t help, please provide us with your site url so we could take a closer look.
Thanks
October 4, 2015 at 7:57 pm #610521PERFECT!
Thank you so much – X Theme just keeps exceeding my expectations.
October 4, 2015 at 10:02 pm #610605Hello There,
You’re most welcome! We are just glad we were able to help you out.
And thanks for letting us know that it has worked for you.Have a great day.
-
AuthorPosts