I want to position these spans in the middle:
https://i.stack.imgur.com/3XHhG.png
and I can do that by adding an offset1 to them:
https://i.stack.imgur.com/bbr8T.png
Now, my questions is: How can I prevent the offset from being colored too. Please excuse me if my question is too vague.
HTML:
<div class="span10" style="margin: 0 auto;background-color:#FFDDDD;">
<div class="row">
<div class="span2 offset1" style="text-align: right">
<h1 style="">RWCO</h1>
<h3>Bis: 11. März</h3>
</div>
<div class="span7">Lorem ipsum dolor sit a...`
You should apply the background color only to the divs (in this case span2 and maybe span7?) you want to have the colored background.
In the example you posted you applied the background to the span10 that act as container and it is normal that you get the background applied to the entire block…
Try this:
By the way, I would advice you to apply styles via classes and not inline…