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 4082814
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:14:03+00:00 2026-05-20T18:14:03+00:00

If I have an inline stylesheet, can and I want – for some strange

  • 0

If I have an inline stylesheet, can and I want – for some strange reason – use the same quotes that u used to encapsulate the attribute value in my html code inside the css.

Is one of these correct?

<div style="background: url(\"http://my-url.com/img.jpg\")"></div>


<div style="background: url(&quot;http://my-url.com/img.jpg&quot;)"></div>

I think the first one is correct and the second one is nonsense. Am I right or not, and why?

edit:

A co worker wrote it the second way, and the problem was that some browsers (included but not necessarily limited to internet explorer 6+7+8) requested the url INCLUDING the " signs which resultet in an 404 request.

edit 2:

okay now its really getting weird. this is the original code copy and pasted from our file.

<div class="cover" style="background-image: url(&quot;http://www.flimmit.com/media/search/filmcovers/105x152/ka/false/kf/false/F7780E.jpg&quot;);">

and this is straight from our error log:

13:09:45 (0.2424) [header] requ_uri        /schauspieler/Kelly+Trump/"http:/www.flimmit.com/media/search/filmcovers/105x152/ka/false/kf/false/F6TYO8.jpg"
Mar 18 13:09:45 (0.0001) [header] server_addr     10.48.195.172
Mar 18 13:09:45 (0.0001) [header] http_user_agent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; eSobiSubscriber 2.0.4.16; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; AskTbFF/5.9.1.14019)
Mar 18 13:09:45 (0.0001) [error] 404-Seite wurde aufgerufen
Mar 18 13:09:45 (0.0386) [header] remote_ip       212.95.7.69 - AT
Mar 18 13:09:45 (0.0001) [header] visitor_id      4095543, -
Mar 18 13:09:45 (0.0001) [header] requ_url        http://www.flimmit.com/schauspieler/Kelly+Trump/"http:/www.flimmit.com/media/search/filmcovers/105x152/ka/false/kf/false/F6TYO8.jpg"
Mar 18 13:09:45 (0.0001) [header] http_referer    http://www.flimmit.com/schauspieler/Kelly+Trump/
Mar 18 13:09:45 (0.0000) [header] finished at 0.2816

this was an IE8 client. on IE6 the request uri even has &quot; instead of " in it.

So either we are all wrong or internet explorer is not respecting any standards?

  • 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-20T18:14:04+00:00Added an answer on May 20, 2026 at 6:14 pm

    use single quotes and I think it should be round brackets:

    <div style="background: url('http://my-url.com/img.jpg')"></div>
    

    The &quot; works too (tested in jsFiddle):

    <div style="background: url(&quot;http://my-url.com/img.jpg&quot;)">test</div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some html content who have some classes and inline stylesheet. i want
The marketing people want to have the ability to write direct inline HTML in
We have some JavaScript code that resizes <div/> elements (adjusts height/width/padding/margin etc.) based on
I have a script that appends some rows to a table. One of the
I have a import directive in my inline .aspx page (no code-behind). Getting an
I am using VB9's inline XML, and I have a need to specify a
Assume I have a function template like this: template<class T> inline void doStuff(T* arr)
Say I have textboxes, dropdownlists and submit buttons. They are all inline-elements. Which means
In my test, I have 2 spans both set to display:inline-block with a border
LINQ simplifies database programming no doubt, but does it have a downside? Inline SQL

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.