Thanks to all the wonderful help I've received here, I've been making a lot of changes to my blog and picking up some useful CSS tips. I have a question about what is more efficient and "correct" as far as CSS code goes.
So, I received the following code because I wanted my post titles on my home page to be above the thumbnails:
.entry-title {
display:block;
position:absolute;
left:0;
overflow:hidden;
height:30px;
width:550px;
white-space:nowrap;
}
Then I was given the following code so my titles and posts wouldn't overlap:
.home .entry-thumbnail,.home .entry-content {
display:block;
padding-top:43px;
}
Today I noticed that the titles and content of my Archives and Pages were still overlapping, and I was able to modify the above code and fix it myself.
body.page .entry-content {
display:block;
padding-top:43px;
}.archive .entry-thumbnail,.archive .entry-content {
display:block;
padding-top:43px;
}
So my question for today is, is there a way to combine all three of the last pieces of code so that it's just one? Is is "better" to have it as one or does it not make a difference?
I ask because I have a bunch of what I think will be global changes to make to my CSS, such as changing the Archives titles and Widget titles to be the same as the post titles, and I wasn't sure if I could just add the various selectors to one bit of code or if I have to write the same code over and over with the different selectors or whatever.
Thanks!!
The blog I need help with is notchangingmyname.com.