blogatorul
Member
Posted 2 years ago #
so let me get this right.
I open header.php with my editor. change <body> with <body <?php body_class(); ?>> and after that i go to ie sheet and preface with .home like this for example:
old:
#mid {
width: 100%;
padding-bottom: 10px;
margin-top: 53px;
new:
.home #mid {
width: 100%;
padding-bottom: 10px;
margin-top: 53px;
Is it corect?
Wont this efect other browsers?
Is it corect?
Yes
Wont this efect other browsers?
No because this sheet will only be read by IE7
blogatorul
Member
Posted 2 years ago #
It`s working. Thank you so much.
Questions: If i want something to take action only in the posts page the <body <?php body_class(); ?>> line has to be in the same place? in the header where you told me? And in my ie stylesheet what class do i have to put? .single?
blogatorul
Member
Posted 2 years ago #
I`ve just used .single like this
.single #mid {
width: 100%;
padding-bottom: 10px;
margin-top: 53px;
and there are no changes.
What should i use?
blogatorul
Member
Posted 2 years ago #
i`ve tryied several things but nothing... @esmi, i see you around. Please help!
Use the page source of one of your post pages to identify what classes you need to use.
blogatorul
Member
Posted 2 years ago #
Ive tryied. I see there this "single postid-x" ... ive tryied .single, .single post, .single postid, .single page, .page (dont laugh) ... whats next?
It depends what you want to style. The block will start with .single but may then need other classes and/or element references (selectors) in order to correctly target the right element on your page. It also depends upon what's already declared in your stylesheet and whether your new block is above or below the existing declarations.
That's why it's called "cascading" style.
An example of a pretty specific piece of CSS for comments might be:
#commentlist .bypostauthor > .comment-body > .comment-author cite {padding-right:20px;}
Move it up 50 lines in the same stylesheet/same theme and it won't work. You have to get both the selectors and the position right.
I`ve wanted to change the same things, but with some variables for index, and other variables for post page. Same thing as earlier.
#mid {
width: 100%;
padding-bottom: 10px;
margin-top: 53px;
For index has to be 70 px, and for post page has to be 50 px. Only with this variables set that panel has the same position.
blogatorul
Member
Posted 2 years ago #
still me up with kiano.ro. I was logged with another username.
Well, that`s it. Thank you all very much for your help and especially esmi. This topic is resolved for sure.