Forum:Infoboxes and CSS

ShoutWiki — express yourself and be heard!
Jump to navigation Jump to search

Forums: Index Community help


I've got the infobox fields set up the way I want them. But I can't figure out how to get the box to have a border, and to sit on the right side of the page like a regular Wikipedia page does.

http://thesadgirl.shoutwiki.com/wiki/Daniel_Cumberland is the main page I'm working with. I have Template:! and Template:Infobox_character set up. I also have created http://thesadgirl.shoutwiki.com/w/index.php?title=User:Bobmueller/monobook.css which I think has the needed CSS for the infobox.

What else do I need to do?

I would like to help. But I assume it is a private wiki as I see a Permission error message when I click the links.
Percy (talk) 07:58, 19 September 2015 (UTC)
  • Like Percy, I can't see the templates themselves, as it appears your wiki is private. However, this should hopefully help in the mean time:
Super basic border example
Hi
{| style= "border: 1px solid black"
|Hi
|}

In this simple example, we create a 1px solid black border. This can be changed to whatever style you want here. In general:

{| style = "border: width style colour"
|
|}
  • Width can be whatever thickness you want, although if you set it too large and it may hide the content.
  • Style is usually either solid, dashed or dotted. There may be some more settings but I can't remember them.
  • Colour can be any accepted colour name (red, black, blue, green) or any HTML colour code.

Now, you can also set the properties individually if you'd like (i.e., border-style: dashed or border-color: green), but it doesn't make a difference to the outcome.

Alignment
Hi
{| style= "border: 1px dotted black; float: right"
|Hi
|}

Here, I've set our basic little box to float right. It is as easy as just adding the "float: right" to the style section of your template. You can also float left (although that is usually the default) and float center.

If that doesn't clear things up, feel free to ask any questions.

Thanks, CJC (talk) 16:56, 19 September 2015 (UTC)


Thanks much, guys. I didn't even think about permissions on this, but with what CJC gave me, I made it do what I wanted it to do.

Bobmueller (talk) 22:19, 19 September 2015 (UTC)