inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 9, 2012 15:52:40 GMT -8
I posted this over in the General v5 Discussion area and was directed to, I think this area. Here is my question:
Is it possible to change those standard single horizontal rule lines in posts with images? I've checked the CSS and Layout Template and came up with nothing that even came close doing a search for the horizontal rule line words.
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Dec 9, 2012 16:33:23 GMT -8
The trick here is that those aren't horizontal rules any more, they're just borders on the parts above/below the post (see the tiny yellow lines between the green and orange parts on this screenshot). Now, we could use the ideal-sounding border-image property, but the way PB has the post list tables done means we can't use that (and not even the latest version of IE supports it, so we'd have to do a workaround anyway). So, let's do it the old-fashioned way, I'll use this image as an example. Before we start, we'll need to know the height of the image we want to use; in our case, it's 8px. /*Use image for post borders*/ .posts .content-head, .messages .content-head, .signature {background-image: url("http://i.imgur.com/aRvux.png"); background-repeat: repeat-x; border-width: 0px !important;} .posts .content-head, .messages .content-head {background-position: bottom left; padding-bottom: 13px !important;} .signature {background-position: top left; padding-top: 18px !important;} In the first line: we're adding the image we want to use for the border; setting it to only repeat horizontally and removing the border. The only thing you'll need to do here is replace the image. In the second line: we're setting the background to start in the bottom left corner of the area above the post and then we're also setting the padding at the bottom to accommodate the image. For the padding, simply take the height of the image and add 5. In the last line: we're doing the opposite of above and setting the image to start in the top left of the area, and now we're setting the top padding. For this, we add 10 to the image height. We're using the !important tags to more easily override the previous styles, we'd have to make the selector (.posts .content-head [etc]) parts more complicated otherwise. When that's all done, go to Themes > Colors and styles > Stylesheet tab and add it at the bottom. This will work in both posts and messages, but not on any [hr] tags in posts (which is okay, because those should be subtle anyway and you could use a similar process to the above on a [div style="here"] tag if need be).
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 9, 2012 17:22:43 GMT -8
Hello again Shrike... Just copied / pasted your info to notepad and will take this on tomorrow. The size I have for that image is 517x18: and hope this will work. Once again, thanks for all your time and assistance here at ProBoards.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 9, 2012 17:54:33 GMT -8
Well this was so simple that added it to the CSS and got this: Added this: /*Use image for post borders*/ .posts .content-head, .messages .content-head, .signature {background-image: url("http://i47.tinypic.com/24kys6u.png"); background-repeat: repeat-x; border-width: 0px !important;} .posts .content-head, .messages .content-head {background-position: bottom left; padding-bottom: 23px !important;} .signature {background-position: top left; padding-top: 28px !important;} and got this:
|
|
inherit
Jack of All Trades, Master of None
27090
0
May 30, 2013 20:36:34 GMT -8
Stinky666
8,818
July 2004
stinky666
|
Post by Stinky666 on Dec 9, 2012 18:04:00 GMT -8
Hello again Shrike... Just copied / pasted your info to notepad and will take this on tomorrow. The size I have for that image is 517x18: and hope this will work. Once again, thanks for all your time and assistance here at ProBoards. Just a quick note, the image shows as 557px width for me, not 517px. =)
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 9, 2012 18:12:05 GMT -8
My mistake Stinky666 and that may be why its not working correctly.
Thanks for pointing that out.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 9, 2012 18:37:13 GMT -8
Got it! Was just a matter of resizing the width.
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Dec 10, 2012 2:05:34 GMT -8
If you didn't want to stretch the image by resizing it, you could make some changes to the CSS to make it show only one image. Changing the background-repeat in the first line to no-repeat and changing the second value of both background-position properties to center should show only one centered image.
/*Use image for post borders*/ .posts .content-head, .messages .content-head, .signature {background-image: url("http://i47.tinypic.com/24kys6u.png"); background-repeat: no-repeat; border-width: 0px !important;} .posts .content-head, .messages .content-head {background-position: bottom center; padding-bottom: 23px !important;} .signature {background-position: top center; padding-top: 28px !important;}
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Dec 10, 2012 4:10:00 GMT -8
Nothing like a non-coder learning and now centered. Thanks much Shrike.
|
|