Currently I use w3.css to a html page and use it in content editor webpart. The issue here is the CSS is affecting the whole page.How do I get the css to apply only to the content editor webpart.
I used the below link option 4 to add the content editor and the HTML file
http://sharepoint.hannahswain.eu/2014/10/10/adding-a-code-snippet-to-page-content-on-sharepoint-2013/
If you are using the same classes then of course all the elements that have those classes will be affected.
If in your webpart you assign unique css classes to the elements, only they will be affected. The web part is simply hosted on the page thus being a part of the page. If you tale a look at the source code of the page then you'll see that the web part is just another element on the same page.
Related
I'm beginner in web programing and I'have small problem with understanding of HTML5 tags. The main tag is for main content but filedset can be in this tag or main tag should be in filedset tag ?
And web site logo how tags I should set for this ? I should insert img in other div or I should set all tags from this div to img ?
https://jsfiddle.net/adriansikora344/5t0Lzs0y/
or
https://jsfiddle.net/adriansikora344/ug3adstu/
Main tag (quoted from w3c):
The content inside the element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.
The fieldset tag is intended to group some form fields, so if you have a form in your web it's fine to get it wrapped by the main tag.
About the logo... This is a very open question. There is not a correct structure, I mean, depending on how you would like to organize contents or views you will need an HTML composition or another. I suggest you to try to create your page. Then, when you get stuck in some concrete problem, you can came back and create a new question with a detailed explanation of your problem and (this is important) an example of what are you tryin to accomplish your target.
I'm trying to do a simple wysiwyg editor and I am trying to edit this page.
I inserted that code into my editor and included the original css file from the website, yet it seems like ckeditor is putting its own tags around the overall content which breaks the original design. Is there a simple way to overcome this?
Thanks
Inline editing is what you want to do there. Simply render the website (component) in your admin panel, using your default, frontend styles and create inline editors for all editable fields. Finally serialize contents of editors.
CKEditor uses CSS from ckeditor/contents.css - you have to add your CSS there.
Your file is visible at http://makehugeprofit.com/editor/ckeditor/contents.css?t=E0LB and as you can see, it doesn't contain much. How did do "included the original css file from the website"? Merge it with contents.css and you'll have greater luck.
The editable area is an iframe and thus not in the same CSS space as your surrounding site.
I have the master-child pages in asp.net, i want to highlight the page which is currently active, it can be done easily using id's for various pages and navigation links in css, but here in asp.net master-child page concept, there is no <body> for child contents, how to solve this problem ?
Try using a css style. you could use something like :
U can now use a simple function to set the css class to use
I am wondering if there is a way to use custom css for some specific text on my confluence page (not using embedded HTML).
Sorry this is an old question, but for the sake of people who search for an answer to this question: you can use span or div macros and use the custom css to apply whatever style you want to their contents.
If necessary, you could create custom div and span classes to allow for multiple styles to be applied to selections of text.
EDIT: Here is an example of the wikimarkup you could use to do this
{div:class=customCss|style=float:left; margin-right:50px}
Custom text in a div
{div}
So you can either use the div class and apply a style in the custom css for the confluence space, or you can use an inline style for the div.
You can do this ...
{composition-setup}import.css=/download/attachments/123456789/custom.css
{composition-setup}
That's if you've stored a custom.css file as an attachement. You'd obviously need to replace 123456789 with the actual attachment number.
You can also link CSS on an external site (with an absolute URL), but if you have any automatic URL formatting, that tends to mess it up everytime you change the document.
I use a User Macro that renders the $body in HTML. Then I can put whatever HTML tags I want in the wiki page within the user macro tag.
There could be a way to reach what you want to reach, but there is some information missing (from you). What confluence allows is the following:
If you have admin rights to the confluence wiki space, you could add there a custom style sheet that applies to all wiki pages. Else you could follow the answer of Mus.
Then you should analyse the wiki page in source form. So load a wiki page you want to style, and look at the source of that wiki page in your browser. Depending on your browser, this may be CTRL-U or something similar. Here in chrome, the page menu says View page source.
Try to find the defining selector for your wiki text you want to style in some form. A reasonable hack could be:
Find a wiki style that is not used by others. I have experimented with ~subscript~.
Find the HTML tags that are built by using that style. In my example, it was <sub>subscript</sub>.
Use your custom style sheet to style text of that style.
However, this may change the text where the style is used for its original sense :-(
You can specify custom CSS in your Confluence page via the div and span macros.
In recent Confluence versions (4.0 and later), you can do this as follows:
Type {div} or {span}. On typing the closing brace }, auto-complete will convert the text to a macro.
Left-click on the frame of the macro and select the Edit button
Enter the custom CSS into the Style field and close the dialog
Enter your text into the macro frame. It will then have the style you specified.
I have a specific Content Page (with an existing Master Page) that pretty much just has basic text wrapped with some <p>, <ul>/<li>, <h3>, <h4>, <blockquote> tags...like a blog post.
Is this ok to hardcode all of this html into my content page? Is there a better way (design-wise) to put text into an ASP.NET web page?
Yes, that's fine. Just make sure that if you're actually using a Content Page (in that it's a child to a Master Page), you keep all your HTML within the ContentPlaceHolders.
Look into MasterPages, which will allow you to define a basic template, and then each of your pages will consist of just a content section which you can fill in, thereby foregoing the need to have all that extra template code every single time.
Traditional HTML is perfectly fine with aspx pages.
You could create a master page (right click the project -> add new item -> select master page). After configuring this page, every time you create a new aspx page select the master page you just created as your masterpage template. Visual Studio will create a basic layout that includes <asp:content> tags. Just put your HTML markup there.
It depends on the objetive of the project... If you think that is going to grow into a big project you should considere using templates :)