留言板

CSS for a single Portlet

thumbnail
lutz Bremen,修改在12 年前。

CSS for a single Portlet

Expert 帖子: 291 加入日期: 11-10-20 最近的帖子
Hey guys,

i got a little problem with adding css to a portlet.
i take a simple web contetnt portlet and add my css code under the look and feel option.
then i add my html and javascript code and nothing happens.

when i try the javascript code alone it works and everything is ok. when i test the css alone on my pc everything is ok and works.

so could u pls help me with that?

thanks in advance
thumbnail
Mani kandan,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 492 加入日期: 10-9-15 最近的帖子
Where did you add add my html and javascript code?
thumbnail
lutz Bremen,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 291 加入日期: 11-10-20 最近的帖子
i added the code in the portlet like this
thumbnail
Mani kandan,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 492 加入日期: 10-9-15 最近的帖子
What did you add?
thumbnail
lutz Bremen,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 291 加入日期: 11-10-20 最近的帖子
i added some code html and javascript. the code works i know it.
how can i add my css in there? for example this:

#container1
height: 100%;
width: 50%;
position: center;
background-color: red;

and in the javascript i define the text that should be at in this red box.
thumbnail
Mani kandan,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 492 加入日期: 10-9-15 最近的帖子
Test this code in your web content portlet.




  <title>My first styled page</title>
 <style type="text/css">
  body {
    color: purple;
    background-color: #d8da3d }
  </style>




<!-- Site navigation menu -->
<ul class="navbar">
  <li><a href="index.html">Home page</a>
  </li><li><a href="musings.html">Musings</a>
  </li><li><a href="town.html">My town</a>
  </li><li><a href="links.html">Links</a>
</li></ul>

<!-- Main content -->
<h1>My first styled page</h1>

<p>Welcome to my styled page!

</p><p>It lacks images, but at least it has style.
And it has links, even if they don't go
anywhere…

</p><p>There should be more here, but I don't know
what yet.

<!-- Sign and date the page, it's only polite! -->
</p><address>Made 5 April 2004<br>
  by myself.</address>



thumbnail
lutz Bremen,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 291 加入日期: 11-10-20 最近的帖子
i cant publish this code. no errors, no warning, nothing.

i publish it and nothing happes. i reopen the window and the coed is gone.
thumbnail
Mani kandan,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 492 加入日期: 10-9-15 最近的帖子
I can able to publish the above code. See the attachment
thumbnail
lutz Bremen,修改在12 年前。

RE: CSS for a single Portlet

Expert 帖子: 291 加入日期: 11-10-20 最近的帖子
it works!! wuuuhuuu.
thank u very much !