Wrong URL?

  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

Code: [ Select ]
background-image: url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');


ok when i add the above, the image don't show. I look on the browser status bar and it thinks its downloading..

http://www.dhost.info/gmforum/rethink/s ... le1_01.gif
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • quantumcloud
  • Proficient
  • Proficient
  • User avatar
  • Posts: 456
  • Loc: Dhaka, Bangladesh

Post 3+ Months Ago

There is nothing wrong with this piece of code. I tested it. The url is okay too. The server might have been down when you tried it.
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

Does not work still.
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

Code: [ Select ]
/* Main Heading (on the top) */
.heading_top {
background-color: 000000;
background-image: url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
border-size: 0px;
width: 100%;
}
/* END */
  1. /* Main Heading (on the top) */
  2. .heading_top {
  3. background-color: 000000;
  4. background-image: url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
  5. border-size: 0px;
  6. width: 100%;
  7. }
  8. /* END */



My whole bit of code.
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

The problem was, i created a background color before the image. Remember to always set the background image first.
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

It is happening again....

It's when i short link, ie) styles/style1/images/style1_01.gif
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

must be something wrong with your path. Is the css in the rething dir?
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

yeah.

yep its in the corrent path....

The file i am working on (index) has this css attachment to it.

The index.php is in the rethink folder. Then the css is:

rethink/styles/style1/style1.css

Where index.php is only in rethink.

Get me?
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

Code: [ Select ]
.heading_top {
background-image: url('styles/style1/images/style1_01.gif');
background-color: #cccccc;
border: 0px solid #000000;
width: 100%;
}
  1. .heading_top {
  2. background-image: url('styles/style1/images/style1_01.gif');
  3. background-color: #cccccc;
  4. border: 0px solid #000000;
  5. width: 100%;
  6. }


here is what i use. The color CCCCCC shows instead of image.
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

have you tried to take the color out completely? or are you using some kind of transparent image overtop that? I am not sure if you can do that or not.

What happens when you take that property out?
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

Nah, i have tried taking out the colour.

I use the same url i used in the css in to the Table itself and that works perfectly.

But then i realised, the urls do not work like that.

Because the css files was in a different folder i had to change the url.

In other words i fixed it.
  • cjxxi
  • Expert
  • Expert
  • cjxxi
  • Posts: 565
  • Loc: Fort Worth, TX

Post 3+ Months Ago

:!: :smilecolros:

Try this easy one
Code: [ Select ]
<BODY background="C:\Documents and Settings\cj\Mis documentos\Untitled-1.png" bgColor="#0000FF">
</BODY>
</HTML>
  1. <BODY background="C:\Documents and Settings\cj\Mis documentos\Untitled-1.png" bgColor="#0000FF">
  2. </BODY>
  3. </HTML>

:!:

:banana: :multi:
  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

Quote:
In other words i fixed it.


My last post.
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1853

Post 3+ Months Ago

Nem wrote:
Code: [ Select ]
/* Main Heading (on the top) */
.heading_top {
background-color: 000000;
background-image: url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
border-size: 0px;
width: 100%;
}
/* END */
  1. /* Main Heading (on the top) */
  2. .heading_top {
  3. background-color: 000000;
  4. background-image: url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
  5. border-size: 0px;
  6. width: 100%;
  7. }
  8. /* END */



Nobody said this, so I will.

Note that 000000 is not a proper color value. Color numbers "must" have a pound symbol beofre them -- some browsers might let you get away with it, but that behavior might not continue in the future.

Also, there is no such property as "border-size." You mean to use border-width, of course. Alas, here is an example of fixed code:

Code: [ Select ]
.heading_top {
background-color: #000000;
background-image: url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
border-width: 0px;
width: 100%;
}
  1. .heading_top {
  2. background-color: #000000;
  3. background-image: url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
  4. border-width: 0px;
  5. width: 100%;
  6. }


And further, I always like to give an example of how I would write the code, if I were feeling like typing less:
Code: [ Select ]
.heading_top {
background: #000 url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
border-width: 0;
width: 100%;
}
  1. .heading_top {
  2. background: #000 url('http://www.dhost.info/gmforum/rethink/styles/style1/images/style1_01.gif');
  3. border-width: 0;
  4. width: 100%;
  5. }
  • Vladdrac
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2136
  • Loc: Louisville, Ky

Post 3+ Months Ago

hmmm, nice lean code Sam, I did not know that you could give the color and an image in a background: propery.
  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

Vladdrac wrote:
hmmm, nice lean code Sam, I did not know that you could give the color and an image in a background: propery.


You can put all of yor background properties into the background property http://www.w3.org/TR/CSS21/colors.html# ... background

The specs are quite handy to have a little look through, although some of it is pretty heavy going. And of course the w3c won't tell you about browser bugs, they just tell you how it is <i>supposed</i> to work!

In terms of trimming down the code even further, and this would probably have helped with the original problem, I keep all my layout graphics in the same folder as the stylesheet, and then just reference the filename from the .css file, with no path needed.

Post Information

  • Total Posts in this topic: 16 posts
  • Users browsing this forum: No registered users and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.