By Allthegearnoidea on
Hi
I recently added the Service Links module as well as Fivestar to my site. Both work well, but I don't like the way they both appear on the page.
If you go to this link: http://www.parentsown.co.uk/page/food-ingredients-getting-some-answers you'll see the service links and the five star ratings at the bottom of the page. I think they look too squashed up together and I'd like a couple of lines space between the two.
How would I go about adding this space?
Thanks
Comments
Short answer: CSS.
Short answer: CSS.
Ok....
Thanks, but as I don't really know CSS, though I'm up for giving things a go, where do I start to look to make some changes?
Or is it too complicated to try and explain? In which case I'll admit defeat until I have learnt more about CSS.
Support for families with children with medical conditions: http://www.parentsown.co.uk
Buy allergen free foods from http://www.freefromforkids.co.uk
If you're up for it
Make sure to back up any file you're going to try changing, of course, because it will be really easy to screw up the appearance of your site while experimenting with this. But as long as you save and restore the original file you should be okay. (If you want to be totally confident that you won't cause problems to the live site and it's feasible you could set up a 2nd "sandbox" or "development" copy of the site to play around with. Your web host might even offer setting up a copy as a (paid) service.)
What you're going to be doing is experimenting with modifying one of the files named
«something».cssthat correspond to the Drupal theme you're currently using. Those files are either going to be underthemes/orsites/all/themes.Within each of these files is a list of CSS rules. Each rule looks something like
Now to change the vertical spacing of the blocks you're probably going to need to add a new CSS attribute like
margin-top: 20px;...inside the curly braces in one CSS rule within one file. You will need to experiment to find the correct rule to change in the correct file. Once you hit the right one you'd want to change that "20px" number to increase or decrease the gap it creates.
One important note: once you find the right change that makes it look the way you want, make notes on exactly what you had to do. If you upgrade to a new version of Drupal or your theme in the future you may have to re-do the changes.
To further your knowledge of CSS once you get the hang of it, these guys do nice, concise charts of the other CSS attributes available or that kind of information is all over the web too.
Good Luck!
I'd do something like this
I'd do something like this (in your themename.css file):
form.fivestar-widget
{
margin:10px 0 0 0;
}
Thank you
This is all excellent stuff, thanks guys.
I have a dev version of my site so I'll take the advice and tinker with that until I hit upon something that works.
I'll let you know how I get on with this issue.
Thanks again for the all the effort here and for the links to some extra resources I'm determined to get more savvy with the nitty gritty stuff rather than just getting a site going and adding modules etc.
Support for families with children with medical conditions: http://www.parentsown.co.uk
Buy allergen free foods from http://www.freefromforkids.co.uk
Perfect!
Saoirse1916 thanks for the small piece of code. Worked like a charm. Now all I need to do is understand why it worked! :-)
Thanks again for your replies guys.
I'm now going to bury myself in CSS for dummies to get my head around some of this stuff.
Support for families with children with medical conditions: http://www.parentsown.co.uk
Buy allergen free foods from http://www.freefromforkids.co.uk
I just looked at your site's
I just looked at your site's code and saw that your form in question had a class attribute ("fivestar-widget") which you then addressed in your CSS with form.fivestar-widget. By adding margin to the top it pushed it down a bit -- that syntax adds margin in the top-left-bottom-right order, so we added 10px of margin to the top.
Very clear
Thank you very much, that makes sense I wondered how you knew to use fivestar-widget... Now I know. :-)
This is probably going to be useful for other tweaks too!
Thanks again.
Support for families with children with medical conditions: http://www.parentsown.co.uk
Buy allergen free foods from http://www.freefromforkids.co.uk