Change color to a column

General chit chat about razor, not specifically related to a topic but about razorCMS

Change color to a column

Postby b14 » Sat Jan 17, 2015 5:59 pm

Hi!
how do I change color to a single column of text?

I tried it with the button "code". An example:

Code: Select all
<style>
body {
    background-color: red;
}
</style>
<body>
hello world!
<body>




but razor automatically deletes the <body> tag

Thank You
b14
 
Posts: 10
Joined: Tue Nov 25, 2014 3:54 pm

Re: Change color to a column

Postby smiffy6969 » Sun Jan 18, 2015 7:11 pm

Add the style to the tag directly using the style attribute..... Wrap your text in a tag and inline style the tag.

Paul
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: Change color to a column

Postby b14 » Wed Jan 28, 2015 5:46 pm

Thanks Paul :)
so, if I have understand your explanation,for example with:
Code: Select all
<h1 style="background-color:red">Hello World!</h1>

I underline only text.

How can I color the whole block in red without white lines?is it possible?

Thanks!
b14
 
Posts: 10
Joined: Tue Nov 25, 2014 3:54 pm

Re: Change color to a column

Postby smiffy6969 » Wed Jan 28, 2015 7:16 pm

Code: Select all
<div style="background-color:red">
<h1>Your title</h1>
<p>Some text here...</p>
</div>


You could surround it in a div and style that..... try looking on bootstrap website to look at styling ideas, you could place them in a well

Code: Select all
<div class="well">
<h1>Your title</h1>
<p>Some text here...</p>
</div>


This would also help with padding etc.

Generally we do not stlye the content box, we style the stuff in it.

The editor lets you highlite text and set the colour by selecting some text and using the colour tool to set font colour and background in the editor.

ta

Paul
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: Change color to a column

Postby b14 » Wed Jan 28, 2015 8:42 pm

Ooooh! <div> tag!!! You're right!
Thanks so much Paul! :)
b14
 
Posts: 10
Joined: Tue Nov 25, 2014 3:54 pm


Return to General Discussions



Who is online

Users browsing this forum: No registered users and 1 guest

cron