I'm in need of some assistance, as I'm picking up Umbraco again after some time, and I'm somewhat stuck. I'm sure it's very simple, and just need to look at it from another point of view.
So! I need to style this umbraco field I have inserted in my home page.
I made sure I'm using the right tag, and the right css, so that should be fine, yet I can't seem to be able to edit it.
Might prove important to note that it's a text field that is being inserted into a h1 tag, which is what I'm trying to target.
It looks like you're not including the stylesheet within your view. In order to test this theory, in your view (where <h1>@Umbraco.Field("pageTitle")</h1> is) add the following:
If this solves your problem, then your stylesheet hasn't been added correctly. If you want to give your css a separate file (and you really should), you need to link it up like this:
<link href="~/css/sample.css" rel="stylesheet" />
Obviously the href attribute needs to reference your particular stylesheet, but that should work then.
you're right, that did have the desired effect, which kinds of puzzles me?
I was under the impression that if I made the home page as a child to my master page, it would inherit the stylesheet as well?
My css file is being linked like this on my master:
Okay, it sounds like your child template isn't inheriting from the master template. In Settings > Templates, make sure that your Homepage has your desired master page.
I checked, and yes, the homepage is marked as the master's child on the Document Types, and it is created under the master page on both Document Types and Templates
I'm sorry but I can't understand what you are trying to achieve. Are you trying to add style into Umbraco to use it with RTE further (Under Settings -> Stylesheets)?
I mean, where are you placing CSS how are you using it? (directly from RTE, from html code, etc...)
The CSS is being called on my master page, and being used to style a H1 tag that contains @Umbraco.Field("pageTitle") on my homepage, but to no avail yet.
Styling an Umbraco page field?
Hey guys!
I'm in need of some assistance, as I'm picking up Umbraco again after some time, and I'm somewhat stuck. I'm sure it's very simple, and just need to look at it from another point of view.
So! I need to style this umbraco field I have inserted in my home page. I made sure I'm using the right tag, and the right css, so that should be fine, yet I can't seem to be able to edit it.
Might prove important to note that it's a text field that is being inserted into a h1 tag, which is what I'm trying to target.
Here's the snippet:
with the following sample css:
Hi Willi,
It looks like you're not including the stylesheet within your view. In order to test this theory, in your view (where
<h1>@Umbraco.Field("pageTitle")</h1>
is) add the following:If this solves your problem, then your stylesheet hasn't been added correctly. If you want to give your css a separate file (and you really should), you need to link it up like this:
<link href="~/css/sample.css" rel="stylesheet" />
Obviously the
href
attribute needs to reference your particular stylesheet, but that should work then.Let me know how you get on :)
you're right, that did have the desired effect, which kinds of puzzles me? I was under the impression that if I made the home page as a child to my master page, it would inherit the stylesheet as well?
My css file is being linked like this on my master:
which works just fine, at least on the master page itself, but if I use the code you use above, there's still no change on the child.
Okay, it sounds like your child template isn't inheriting from the master template. In
Settings > Templates
, make sure that yourHomepage
has your desired master page.It should look something like this:
I checked, and yes, the homepage is marked as the master's child on the Document Types, and it is created under the master page on both Document Types and Templates
edit: Yes, it looks like that as well
Hi
I'm sorry but I can't understand what you are trying to achieve. Are you trying to add style into Umbraco to use it with RTE further (Under Settings -> Stylesheets)?
I mean, where are you placing CSS how are you using it? (directly from RTE, from html code, etc...)
Lionel
Hey!
The CSS is being called on my master page, and being used to style a H1 tag that contains
@Umbraco.Field("pageTitle")
on my homepage, but to no avail yet.is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion