Deep beginning

Frederick:
Thank you, it’s much clearer. Unfortunately, since I work with files
saved
in app/… and the address equals public/… I cannot imagine any case
to
use relative path :confused:

Hassan.:
I figured it out, but from the example I really wasn’t able to derive
that I
have to do it that and only that way exactly.
And I’m bothering for many reasons…you would probably consider the
most
interesting one that I don’t want to use web spaces with advertisment
(That
of course I find one useful ruby webhosting)

2010/7/24 Frederick C. [email protected]

Fred:
Thank you, I’ll take a look.

Hasan:
As I described earlier: <body background=<%= image_tag
“darkKnight_wide.jpg”
%>>
but since my mistake I moved pictures to the images dir…but this still
doesn’t work :frowning:
And abou studiing html and css…I did, but I do not understand to
articles
about this stuff, so I learn stuff I need to do and I’m learning it
backwards, it works for me.

Jan

2010/7/24 Hassan S. [email protected]

On Sat, Jul 24, 2010 at 9:26 AM, Jan K. [email protected]
wrote:

On the other hand the absolute path is recognized by starting with the only
root of the whole computer filesystem, like “/” or "C:"

No, “absolute path” in terms of a web app means a path starting with
a “/” that indicates the base of your web application’s root. It’s
usually
better to use absolute paths, since the actual context of any given page
or page fragment may not be obvious.

Sir, I may be an idiot, but it doesn’t work.
I have pictures in public/pic
the picture filename is darkKnight_wide.jpg
and I’m reffering to it like this:

>

Of course it doesn’t work – you ignored what you were told, which
was to put it in /public/images, which is the path an image_tag will
create for it. It’s a convention. Rails has lots of them, and learning
and adhering to them will make this all much easier :slight_smile:

and I know nothing abou html, but there is no way that the ‘higher power’
translating that ruby babbling

And if you think this whole thing is “ruby babbling” – why are you even
bothering?


Hassan S. ------------------------ [email protected]
twitter: @hassan

On Sat, Jul 24, 2010 at 10:06 AM, Jan K. [email protected]
wrote:

And I’m bothering for many reasons…you would probably consider the most
interesting one that I don’t want to use web spaces with advertisment (That
of course I find one useful ruby webhosting)

I have absolutely no idea what you mean by that, but good luck :slight_smile:


Hassan S. ------------------------ [email protected]
twitter: @hassan

On Sat, Jul 24, 2010 at 10:11 AM, Jan K. [email protected]
wrote:

>

The background attribute is deprecated – you should really use CSS
for this.

but since my mistake I moved pictures to the images dir…but this still
doesn’t work :frowning:

Did you restart your server? What’s view source show you as the
path? Are you using a tool like Firebug to examine why the request
isn’t working?

And abou studiing html and css…I did, but I do not understand to articles
about this stuff, so I learn stuff I need to do and I’m learning it
backwards, it works for me.

If you say so :slight_smile:

You might want to play around with some static HTML pages a bit to
get a better feel for how HTML and CSS work…

FWIW,

Hassan S. ------------------------ [email protected]
twitter: @hassan

I meant I was unable to find ruby webhosting, where could I try to build
up
web pages in ruby. Even If I found it, it would contain advertisment for
being free. So this way I can build my own web on my own computer with
ruby
and without advertisment.

btw. the background ruby code generates this

<body background= Darkknight_wide >

which is just weird :frowning:

Jan.

2010/7/24 Hassan S. [email protected]

try http://www.heroku.com

On Sat, Jul 24, 2010 at 10:18 AM, Jan K. [email protected]
wrote:

I meant I was unable to find ruby webhosting, where could I try to build up
web pages in ruby. Even If I found it, it would contain advertisment for
being free.

heroku.com has a minimal free plan that doesn’t involve advertising,
and it’s very easy to work with.

btw. the background ruby code generates this

<body background= Darkknight_wide >

which is just weird :frowning:

No, it’s just wrong. image_tag creates a tag for an image, which is
not what the background attribute is expecting.

You should use your style sheet to set this, e.g.

body { background-image: url(“/images/darkKnight_wide.jpg”); }


Hassan S. ------------------------ [email protected]
twitter: @hassan

I tried heroku. I wasn’t even able to figure out how to connect to it or
do
anything with it :frowning:
but thanks for advice with the background.

Jan

2010/7/24 Hassan S. [email protected]

I added to .css file this
background: /images/darkKnight_wide.jpg
aaand it doesn’t work.
My problem with css is that it is not part of the source code, so I cant
take a look, where in the code is it built in. You may say that it is
obvious, but I’m saying I don’t trust obvious, I trust my eyes. I’m
sorry on
this one, but I really don’t believe that .css is worthed, but if you’ll
be
so kind and advice me, how background in css works, I’ll be really glad.

“Did you restart your server? What’s view source show you as the
path? Are you using a tool like Firebug to examine why the request
isn’t working?”
Restart I did indeed.
What is view source and Firebug I don’t know
…and I don’t want to create new google. I just want it to be simple
and
work, please.

“You might want to play around with some static HTML pages a bit to
get a better feel for how HTML and CSS work…”
I’d say thats exactly what I’m doing last few days despite what I wanted
to
do…

2010/7/24 Hassan S. [email protected]

On Jul 24, 6:06 pm, Jan K. [email protected] wrote:

Frederick:
Thank you, it’s much clearer. Unfortunately, since I work with files saved
in app/… and the address equals public/… I cannot imagine any case to
use relative path :confused:

File system paths are irrelevant, what matters are the URLs browsers
use to access stuff - even if the file you’re working on is app/
controllers/posts.rb, that’s just /posts to the web browser.

Fred

On Sat, Jul 24, 2010 at 10:30 AM, Jan K. [email protected]
wrote:

I added to .css file this
background: /images/darkKnight_wide.jpg
aaand it doesn’t work.

Of course it doesn’t work – it’s not what I showed you.

My problem with css is that it is not part of the source code, so I cant
take a look, where in the code is it built in. You may say that it is
obvious, but I’m saying I don’t trust obvious, I trust my eyes. I’m sorry on
this one, but I really don’t believe that .css is worthed, but if you’ll be
so kind and advice me, how background in css works, I’ll be really glad.

What are you talking about? CSS is certainly part of your source code.

What is view source and Firebug I don’t know

Every browser offers the option to view the HTML source of a page
you’re looking at it. It’s a basic tool for troubleshooting (and
learning).

Firebug is a Firefox extension that gives you visibility into a number
of areas (CSS, network connections, etc.) and is indispensable for,
again, troubleshooting and learning.

…and I don’t want to create new google. I just want it to be simple and
work, please.

It is simple. You need to develop a better understanding.

Good luck.

Hassan S. ------------------------ [email protected]
twitter: @hassan

On Sat, Jul 24, 2010 at 12:10 PM, Jan K. [email protected]
wrote:

So, can I ask how to join the image_tag tag with the information of align of
image?

Go to http://api.rubyonrails.org/ and look at the entry for image_tag

And you might want to bookmark the following 2 urls, as well:

http://www.w3.org/TR/html401/
http://www.w3.org/TR/CSS21/

HTH,

Hassan S. ------------------------ [email protected]
twitter: @hassan

On Jul 24, 10:18 am, Jan K. [email protected] wrote:

I meant I was unable to find ruby webhosting, where could I try to build up
web pages in ruby. Even If I found it, it would contain advertisment for
being free. So this way I can build my own web on my own computer with ruby
and without advertisment.

You will save yourself a lot of time and frustration if you first
learn the basics of HTML and CSS before trying to build dynamic
websites. You have to learn to walk before you can run.


miles

It works now,thanks.
So, can I ask how to join the image_tag tag with the information of
align of
image?

Jan

2010/7/24 Jan K. [email protected]

Guys, I really appreciate your help, but I can’t read those manuals,
because
they are wrong. Those are written for people like you, who already
understands, which is imho needles.

For example on that api page, you recommended me for seek out the align
tag…it is not there. Well, since I’m not a complete idiot and I knew
it
should be there, I tried the tag align in the format of examples there
and
it worked.

But I can’t learn like that. I’m no oracle and don’t know what the
author
meant…ussually.

And I’m afraid that stuff like: You don’t use , you use
.css…I think it wont be written anywhere, because in the manual to
html
will be information, that it is done like the first example and in .css
manual will be written that it can be done like the second. Am I wrong?

Jan

2010/7/24 cageface [email protected]