inherit
243515
0
Jun 7, 2017 14:51:24 GMT -8
Keen - Summit of Legends
142
April 2017
keenbean
|
Post by Keen - Summit of Legends on Apr 26, 2017 13:51:10 GMT -8
I want to center this checkbox plugin on the page, but the code I have isnt working. Tips?
|
|
Kami
Forum Cat
Posts: 40,198
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,198
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Apr 26, 2017 13:58:32 GMT -8
When requesting coding support, I encourage you to get into the habit of providing a URL so we can see what is happening and what code is being used.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Apr 26, 2017 16:19:38 GMT -8
In addition to what Kami said above, you said that it was a plugin - I'd suggest checking to see if there's a support thread for it. Most plugins will link their support thread. You can get it a couple of ways: (1) Go to the Plugin Library and locate the plugin. Go to its page and there is a Get Help With This Plugin? button on the right side: (2) Another way is right in the plugin settings. Next to the Save Changes button is a Need help? link: If the plugin author linked their support thread, clicking either of those will take you to it. If you end up in the Plugins board, then the author did not link, or does not have, a support thread.
|
|
inherit
243515
0
Jun 7, 2017 14:51:24 GMT -8
Keen - Summit of Legends
142
April 2017
keenbean
|
Post by Keen - Summit of Legends on Apr 27, 2017 5:08:16 GMT -8
Sorry I thought the screen shot was enough...
|
|
#eb7100
33409
0
1
Nov 13, 2024 16:56:46 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Apr 27, 2017 11:03:09 GMT -8
Based on what I was able to see in the forum in your profile the div isn't being centered correctly. You need to use the margin CSS property to center a div. Specifying that its right and left margins should be set to auto forces it to center within its parent element.
Result:
|
|
inherit
243515
0
Jun 7, 2017 14:51:24 GMT -8
Keen - Summit of Legends
142
April 2017
keenbean
|
Post by Keen - Summit of Legends on Apr 29, 2017 7:08:27 GMT -8
Thanks for the reply! I tried putting that in before, but it didn't work. I assume I entered it into the wrong area then. I should be entering it into the header correct? <div style="margin: 0 auto;"><span id="mychecklist"></span></div> This is what I have in my header. And here is a link to my home page in case you need it. summitoflegends.net
|
|
#eb7100
33409
0
1
Nov 13, 2024 16:56:46 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Apr 30, 2017 8:02:43 GMT -8
If you're just adding a div outside of the checklist this won't work because divs always take up the full width of their parent element due to being a block element.
In the HTML For List section of the plugin's settings I would suggest changing the span to a div element and adding the margin property in my example alongside its existing inline styles.
|
|
inherit
243515
0
Jun 7, 2017 14:51:24 GMT -8
Keen - Summit of Legends
142
April 2017
keenbean
|
Post by Keen - Summit of Legends on Apr 30, 2017 11:51:16 GMT -8
I copy/pasted that and removed the span one, but it didn't work. Oh well. And its apparently not taking up all the space there because sometimes it's next to other elements instead of above or under them. It's not horribly important that this gets centered, it would have just fit into my brain better X3 Thanks for your help!
|
|
#eb7100
33409
0
1
Nov 13, 2024 16:56:46 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Apr 30, 2017 11:52:17 GMT -8
Remove this property and it should be centered:
Completely skipped my mind that it was there.
|
|
inherit
243515
0
Jun 7, 2017 14:51:24 GMT -8
Keen - Summit of Legends
142
April 2017
keenbean
|
Post by Keen - Summit of Legends on Apr 30, 2017 17:45:00 GMT -8
rofl okay it worked XD thanks so much!
|
|