I am trying to use CSS to make changes to the built-in survey theme "Minimal 2014". Specifically, I am trying to reduce space in several places to make it more compact.
I have managed to reduce the space between questions and between question and answer choices using ".Skin .QuestionText" and ".Skin .QuestionBody" in the custom CSS option under Look & Feel. However, I cannot figure out how to reduce the padding / margin (?) at the bottom of the answer choice (above the radio button), and above the next/previous buttons. Here is a screenshot
I am a CSS novice - if anyone could help, it would be much appreciated. Thanks!
Use the browser's inspector to identify the CSS rules that need to be overridden. You can adjust these as needed:
.Skin #Buttons {
margin-top: 0px; /* 50px by default */
padding: 20px; /* 20px by default */
}
.Skin .MC .MAHR .QuestionBody table td span.LabelWrapper label,
.Skin .MC .SAHR .QuestionBody table td span.LabelWrapper label {
padding-bottom: 5px !important; /* 20px by default */
}
Related
I'm creating my site based on bootstrap But wanna do some customization.
Any idea to overwrite the bootstrap default style with this one
I know to replace the box style to underline only can use this
border: 0;
outline: 0;
But not knowing how to bend the line
I looked up the relevant Bootstrap 3.3.7 (most recent non-alpha) code for you, which would be the .form-control class.
If you override that class with the following CSS you will likely achieve the effect you are looking for.
.form-control {
border: 0; /* to hide border initially */
border-bottom: 1px solid #ccc; /* to set the bottom border (the only one we need) */
border-radius: 8px; /* to round borders or 'bend the line' */
}
Thus, border-radius is the CSS property you are looking for.
I have a style for inputs on my page, with some basic padding and font size, I tried applying the same style to a link, but for some reason the link is always larger (height) than the button no matter what I do, even with the exact same text and font size, I tried doing display: block but that just makes the button the width of the screen.
Here is the CSS:
.button{
padding: 10px 15px 7px 15px!important;
font-size: 16px !important;
color: white;
cursor: pointer;
border-radius: 2px;
text-decoration: none;
}
.button-3{
background-color: #ff4d4d;
border: 1px solid #ff4d4d !important;
}
I've looked at the Chrome styles panel and confirmed the font / padding is being used (it's not strikken through).
Here is what it looks like:
Looks like the issue is because:
You aren't using a CSS reset.
The line-height needs to be the same.
Make sure you give a consistent line-height to both. For now, set in the both:
line-height: 1.5;
This should fix it. Also, you can compare both the styles with the computed ones, to check if there's anything else being set. Since you say <button>, it might also have some border.
Also, like I guessed, you are also giving border and same colour as background to the button, making it look 2px bigger.
When you open the Developer Tools, try comparing the Computed Styles part:
To avoid this kind of stuff I always set the font family I used.
Take a look at this example: https://fiddle.jshell.net/tnr0jxka/
You also might want to consider adding:-webkit-apperance:none;-moz-apperance:none; to this kind of css, it will save you big time in cross-browser experience.
Buttons do not inherit the global styling automatically.
So, setting font-size of button explicitly will solve the problem
see this solution for more info
It would appear that that bootstrap puts a 10px margin on the top and bottom of the pager and I would like to cut that down to 2px and also make the height of the pager a bit smaller. I'm using the code from the xsnippets.openNTF as follows:
<xp:pager partialRefresh="true" id="pager1" for="repeat1"
panelPosition="left" styleClass="bootstrapPager">
<xp:pagerControl type="Previous" id="pagerControl1"
styleClass="bootstrapPagerPrevious">
<xp:this.value><![CDATA[«]]></xp:this.value>
</xp:pagerControl>
<xp:pagerControl type="Group" id="pagerControl2"
styleClass="bootstrapPagerMiddle">
</xp:pagerControl>
<xp:pagerControl type="Next" id="pagerControl3"
styleClass="bootstrapPagerNext">
<xp:this.value><![CDATA[»]]></xp:this.value>
</xp:pagerControl>
</xp:pager>
as suggested I created a new css and copied the css from the xsnippets into it and applied it to the page however I don't think that should be necessary with bootstrap built in so I removed the css. The pager works the same either way. So I want to over-ride the bootstrapPager class and change the margins.
I created a new css called it myBootstrap.css and added this block
.bootstrapPager {
display: inline-block;
padding-left: 0;
border-radius: 4px;
margin-left: 10px;
margin-bottom: 2px;
margin-top: 2px;
line-height: 1.42857;
}
and changed the top and bottom margins to 2px. added the css as a resource but the pager margins do not appear to have changed. Maybe there are some other settings that need changing. As I read it this class should override the main bootstrap.css.
EDIT
If I set disable Theme to true then it appears to remove the margins, but then it also removes all of the additional styling and that is no good either.
Here is what the pager looks like (not connected to the repeat yet but that should not matter. The major issue is the amount of vertical space that it consumes. When I inspect the element in Chrome it looks very much like it is getting the values from the main bootstrap css.
Bill,
Not sure this will work, but please try adding !important to your CSS selector. This has worked for me in the past. In my case it was OneUI, but the concept is the same. This assumes that the style is being applied, but is overwritten.
.bootstrapPager {
display: inline-block;
padding-left: 0;
border-radius: 4px;
margin-left: 10px;
margin-bottom: 2px !important;
margin-top: 2px !important;
line-height: 1.42857;
}
For more info, I wrote a blog post on this subject last year when I was having a similar problem: http://notesspeak.blogspot.com/2014/10/quick-tip-forcing-css-override.html
Note: I have never had much luck ever trying to us the "disable theme" feature.
Digging through Style.css theme, I coulnd find how to change 2 kinds of margins:
Margin between browser border and site page
Margin between site page border and site content.
I did it for my website http://raigle.net. See Margin 1 and Margin 2 on the picture:
I'm not a pro in Wordpress styling and would be glad to any advice!
When looking for styling, you can use Chrome's Inspector.
Right click an element > Inspect element. It looks like you have an element that acts as an overlay. Just delete (select in elements panel then hit delete) the node and try again.
It's pretty nifty.
http://i.imgur.com/EfCARba.png
about margin1:
it is not margin, it is padding:
.ui-content {
border-width: 0;
overflow: visible;
overflow-x: hidden;
padding: 15px; /* change here */
}
about margin2:
it is not margin too, it is padding:
.site {
padding: 0 24px; /* change here */
padding: 0 1.714285714rem; /* change here */
background-color: #FFF;
}
http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css - line 12 - change padding style for .ui-content {
in http://raigle.net/wp-content/themes/twentytwelve-child/style.css,wp-content/plugins/easy-fancybox/fancybox/jquery.fancybox-1.3.6.pack.css
you have to change padding for div.site. You probably need to add !important clausule for this one, as this style is overwritten in couple other files
Many CSS resets eliminate the <fieldset> tag's border, padding, and margin. I suppose this is to ensure they render uniformly across all browsers. However, fieldsets no longer visually separate groups of HTML (form) elements after the reset.
Two questions:
Do browsers actually render <fieldset> sans reset differently?
What is the best method of getting the 'bordered' look back after a CSS reset? Simply restyling it like this:
fieldset {
border: 1px solid silver;
margin: 2px;
padding: 7px;
}
Some images of what I am describing:
Without reset:
With reset:
The easy answer is: don't use a reset! They are unnecessary provided you have a clue what you're doing.
For instance, if you use a reset then you lose any native UI styles, such as, in this case, fieldsets. In IE, for instance, an unstyled fieldset will have a border with slightly-rounded corners, just like fieldsets in native programs. A reset removes that, and non-native UI sucks.
However, if you insist, just make sure that the styles are defined in the right order. The reset should be the absolute first thing, followed by "un-resets". See, it's redundant!
I had similar problem - what i did it i copied the style from Normalize.css stick this after the css reset
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}