| | |
image will show in <body>, but not in CSS
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
Ok, this is confusing me to no end, I am making a site and am trying to get the background image to stay in the center, not repeating. I've done this countless times by linking to an internet URL, but not from off of my own hdd.
The code I got to work is:
but it repeats it, I don't want it too.
but, when I use CSS, it just shows a blank page.
My CSS code (I just used it in the head tag) is:
I have no idea what I'm doing wrong.
Any help will be greatly appreciated
The code I got to work is:
HTML and CSS Syntax (Toggle Plain Text)
<html> <head> <title>title here</title> </head> <body background=assets\back.jpg>
but it repeats it, I don't want it too.
but, when I use CSS, it just shows a blank page.
My CSS code (I just used it in the head tag) is:
HTML and CSS Syntax (Toggle Plain Text)
<head> <title>title here</title> <style> body { background: url(assets\back.jpg) #fff center no-repeat fixed;} </style> </head>
I have no idea what I'm doing wrong.
Any help will be greatly appreciated
•
•
Join Date: Jan 2009
Posts: 85
Reputation:
Solved Threads: 13
0
#2 Oct 27th, 2009
Check url of the file. Are 'assests' folder and the 'css' file same root? You can also write inline-style. Like:
But external style-sheet was strongly controlled of the layout of your site with one file. The best way is placing the 'css' file and images in the same root.
HTML and CSS Syntax (Toggle Plain Text)
<body style="background: url('assets\back.jpg') no-repeat top center;">
![]() |
Similar Threads
- Random Images on Refresh (JavaScript / DHTML / AJAX)
- Image does not show (ASP.NET)
- Tutorial: Forms: styling text fields with CSS and HTML (Site Layout and Usability)
- css loaded image doesn't show up in browser (HTML and CSS)
- image doesn't show in browser using CSS (JavaScript / DHTML / AJAX)
- image show up (Graphics and Multimedia)
- image show up (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: Overlap flash object in IE8 problem
- Next Thread: Vertical Align issue in IE7
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





