NOXA
New Member
Posts: 15
inherit
238235
0
Jan 22, 2021 18:08:01 GMT -8
NOXA
15
October 2016
dbigrace
|
Post by NOXA on May 26, 2017 23:42:52 GMT -8
I've got an issue: I'm attempting to style a hyperlink with BBCode within this subforum, however, the size and capitalization refuse to conform to the parameters I'm setting with bbcode.
I asked one of the mods about this, and I was told they "put up a class that causes all links to act uniformly", then proceeded to note that I can "always declare a class in your post and manipulate how the link works".
How would I go about doing this, exactly?
The code in question: [div align="center"][table style="width:600px;background-color:#EBEBEB;"][tbody][tr][td style="text-align:center;vertical-align:top;width:115px;"] [/td][td style="vertical-align:top;"] [div style="font-family:calibri;font-size:8pt;text-align:justify;line-height:11px;"][font color="#627f72"] If you are interested in any of the wanted adds, I implore you to read[/font] [a style="color:rgb(141, 141, 141);" href=""][font color="#4eb46b"][u]her profile[/u][/font][/a][font color="#627f72"] completely — maybe even [/font][a style="color:rgb(141, 141, 141);" href=""][font color="#4eb46b"][u]her plotter[/u][/font][/a][font color="#8d8d8d"].[/font][font color="#2e2e2e"] [/font][font color="#627f72"](Feel free to skip the extended history if it's too much for ya). [/font][/div][/td][/tr][/tbody][/table][/div]
On my forum, that code yields the following result:
However, on the forum in question the result is as follows:
Please note the aforementioned unwanted capitalization and larger font size.
Thanks in advance!
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,783
January 2015
msg
|
Post by Lynx on May 27, 2017 8:45:00 GMT -8
Just grabbing one of the links in your spoiler for this. So, you've got this:
[a style="color:rgb(141, 141, 141);" href=""][font color="#4eb46b"][u]her profile[/u][/font][/a]
Instead of that as is, just add a class, like so:
[a class="myClass" style="color:rgb(141, 141, 141);" href=""][font color="#4eb46b"][u]her profile[/u][/font][/a]
Now, since we're adding a class so we can target it to change its CSS, you no longer need the inline styling. So, it can be reduced to this:
[a class="myClass" href=""]her profile[/a]
However, I've noticed that you're not actually linking anywhere (the href="" attribute links to nothing) - so not sure why you're using anchors in the first place. At any rate, once you've got a class for it, you'd just add this to the bottom of your stylesheet:
/* Change certain links */ .myClass a { color: #4eb46b; text-decoration: underline; }
Now, any anchor that's got the class="myClass" in it will conform to the CSS you've defined for it. I'd suggest making sure you use "unique" class names for your classes - just to make sure they don't conflict with a class that might already be existing with that name. For me, I like to use my initials to prepend the class name, so if I was adding the above to my forum, I'd have something like:
[a class="msg-anchor" href="#"]Link Text Here[/a]
and my CSS in my stylesheet would be:
/* Change certain links */ .msg-anchor a { color: #4eb46b; text-decoration: underline; }
Hope that helps.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,783
January 2015
msg
|
Post by Lynx on May 30, 2017 11:36:56 GMT -8
NOXA, Did that work for you? If not, can you let me know what part didn't work?
|
|
NOXA
New Member
Posts: 15
inherit
238235
0
Jan 22, 2021 18:08:01 GMT -8
NOXA
15
October 2016
dbigrace
|
Post by NOXA on May 30, 2017 21:34:05 GMT -8
Sorry for the delay!
It definitely pointed me in the right way; managed to do a bit more tweaking with your suggestions and I got it straightened out!
Thanks!
|
|