Be a Supporter!

Html External Css

  • 224 Views
  • 2 Replies
New Topic Respond to this Topic
gr8rick2843
gr8rick2843
  • Member since: Feb. 25, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Html External Css 2013-04-15 00:26:16 Reply

Ok so I'm doing this HTML/CSS tutorial for school and i have an HTML file with a style sheet, one of the styles is the body tag having a background image the style leads to the image file in the image folder, the tutorial calls for cutting the style tag and pasting it to a NEW file and then removing the beginning/end tags then putting THIS tag in the index.html file which should link the style sheet to the index file (??? still kinda new to HTML, dont know if this is making any sense to you all???)
<link rel="stylesheet" type="text/css" href="css/bridges.css"/>
now all the styles are there, but NONE of the images are! Andy ideas?

Kirk-Cocaine
Kirk-Cocaine
  • Member since: Aug. 17, 2003
  • Offline.
Forum Stats
Moderator
Level 38
Programmer
Response to Html External Css 2013-04-15 04:48:48 Reply

At 4/15/13 12:26 AM, gr8rick2843 wrote: now all the styles are there, but NONE of the images are! Andy ideas?

You'll need to change the paths to the images in your CSS file, as they no longer point to the correct location.


The water in Majorca don't taste like what it oughta.

| AS3: Main | AS2: Main | Flash Tutorials |

BBS Signature
smulse
smulse
  • Member since: Mar. 24, 2005
  • Offline.
Forum Stats
Member
Level 31
Blank Slate
Response to Html External Css 2013-04-15 17:58:43 Reply

At 4/15/13 04:48 AM, Kirk-Cocaine wrote:
At 4/15/13 12:26 AM, gr8rick2843 wrote: now all the styles are there, but NONE of the images are! Andy ideas?
You'll need to change the paths to the images in your CSS file, as they no longer point to the correct location.

To expand, if you've moved your css into a new file in the folder /css, and you're linking to your images in the css like

background: url(images/whatever.gif);

then the file you're trying to pull assumes directory structure would look like:
/css/images/whatever.gif

Whereas you would need to do

background: url(../images/whatever.gif);

BBS Signature