Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3797272
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:22:40+00:00 2026-05-19T13:22:40+00:00

I currently have a css file that I want to link in visual studio.

  • 0

I currently have a css file that I want to link in visual studio. I have included the file in my project yet it is still not working.

I am simply using css to change the body background. Here is my code:

Css – folder: /css/Style.css:

body 
{
   background-image:  url('Images/body-background.jpg');
   background-repeat: repeat-x;
}

Html

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>My Website</title>

        <link rel="stylesheet" type="text/css" href="css/Style.css" />
    </head>

    <body>
        <div id="header">
        </div>

        <div id="page-wrap">
            <ul id="nav">
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
            </ul>

            <p>Main Content</p>
        </div>

        <div id="footer">
        </div>
    </body>
</html>

It all works perfectly when I put the style internally in the head it works perfectly. What’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T13:22:41+00:00Added an answer on May 19, 2026 at 1:22 pm

    The link in the css file to your image is relative to the css file.

    try

    background-image:  url('/Images/body-background.jpg');
    

    to get it from root, or

    background-image:  url('../Images/body-background.jpg');
    

    to get it relative to the css file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have action specific CSS, meaning that it would only link the
Need to get the css file name from a link tag that is in
I have a jsp that contains a css link that looks like <link type=text/css
Question about paths while working in Visual Studio. In my master page I have
I am trying to streamline my page. Currently I have several CSS files included.
I have problem with css styles in aspx.cs file HttpContext.Current.Response.Write(<table class=\'bordered\' cellpadding=\'5\' color: \'red\'
I currently have the following CSS for my 4 columns which might grow to
I currently have this solution to change the css elements when the page reaches
I currently have Eclipse PDT for PHP, I can use HTML,CSS Javascript, PHP as
I have some CSS that doesn't behave correctly with IE8. It works fine with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.