Newbie Seaside and CSS question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie Seaside and CSS question

Brad Fuller
I have a very basic question:

I have set up a #style method containing CSS. I want to put text on the
page in the style of h1 in a div called "header"
The header component  (below, a white rect with a line on the bottom)
renders fine.
The heading level 1 renders fine too.

html divNamed:  was tried -- but it places the header text above
(outside) the header rect component.

How can I place a header: level: 1 inside the "header" component?

brad

----

h1 {
text-align: right;
letter-spacing: 3px;
font-size: 1.2em;
color: #FF0000;
}


#header {
background-color: #ffffff;
border-bottom: 1px #000000 solid;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
padding-bottom: 10px;
}

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Seaside and CSS question

Brad Fuller
Brad Fuller wrote:

> I have a very basic question:
>
> I have set up a #style method containing CSS. I want to put text on the
> page in the style of h1 in a div called "header"
> The header component  (below, a white rect with a line on the bottom)
> renders fine.
> The heading level 1 renders fine too.
>
> html divNamed:  was tried -- but it places the header text above
> (outside) the header rect component.
>
> How can I place a header: level: 1 inside the "header" component?
>  
Well... it appears I was on the right track, just didn't pass a block to
it. This worked:

html divNamed: 'header' with: [html heading: self mainHeader level: 1].

(I found the answer in Lukas's site in his 6 tutorial. Thanks Lukas!)

I think I'll hit more on how to use CSS and Seaside. So, if anyone knows
a better way or other ways, I'm all ears!

thanks,

brad
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Seaside and CSS question

Philippe Marschall
> So, if anyone knows a better way or other ways, I'm all ears!
Add the id to the head element:

html cssId: 'header'.
html heading: self mainHeader level: 1

or with canvas api

html heading; id: 'header'; level1; with: self mainHeader

Philippe
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Newbie Seaside and CSS question

Ramon Leon
In reply to this post by Brad Fuller
> or with canvas api
>
> html heading; id: 'header'; level1; with: self mainHeader
>
> Philippe

You mean...
 (html heading) id: 'header'; level1; with: [self mainHeader].
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Seaside and CSS question

Avi  Bryant

On Feb 22, 2006, at 9:18 AM, Ramon Leon wrote:

>> or with canvas api
>>
>> html heading; id: 'header'; level1; with: self mainHeader
>>
>> Philippe
>
> You mean...
>  (html heading) id: 'header'; level1; with: [self mainHeader].

No parens needed:

     html heading level1; id: 'header'; with: [self mainHeader]

Avi
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Newbie Seaside and CSS question

Ramon Leon
In reply to this post by Brad Fuller
> > You mean...
> >  (html heading) id: 'header'; level1; with: [self mainHeader].
>
> No parens needed:
>
>      html heading level1; id: 'header'; with: [self mainHeader]
>
> Avi

Not needed, but if you auto-format your code, squeak adds them, so I
figure it's a matter of good style.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside