| | |
where to put background in this code
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2006
Posts: 90
Reputation:
Solved Threads: 0
I'm not sure where to put my background image in this code and how to make the image transparent. Could you please help me out. Thank you
HTML and CSS Syntax (Toggle Plain Text)
<? $pagetitle = "WaCoCo: Waterloo Community Coalition"; $pageid = "home"; include('includes/functions.php'); include('includes/header.php'); ?> <?php $dbcnx = @mysql_connect('localhost', 'root', 'bankside'); if (!$dbcnx) { exit('<p> Unable to connect to the ' . 'database server at this time.</p> '); } if (!@mysql_select_db('wacoco')) { exit('<p> Unable to locate the joke ' . 'database at this time.</p> '); } $pages = @mysql_query("SELECT * FROM pages where id=1"); if (!$pages) { exit('<p> Error retrieving categories from database!<br /> '. 'Error: ' . mysql_error(). '</p> '); } while ($page = mysql_fetch_array($pages)) { $maintext = $page["maintext"]; $maintext = bbcode_format("$maintext"); $sidebar1 = $page["sidebar1"]; $sidebar1title = $page["sidebar1title"]; $sidebar1 = bbcode_format("$sidebar1"); $sidebar2 = $page["sidebar2"]; $sidebar2 = bbcode_format("$sidebar2"); $sidebar2title = $page["sidebar2title"]; ?> <div id="col1"> <? //include('includes/getflickr.php'); ?> <h2> Welcome to WaCoCo</h2> <p> <? echo($maintext); ?> </p> <font color="#993300"> <h3> WaCoCo News</h3> </font> </div> <div id="col2"> <h2> <? echo($sidebar1title); ?> </h2> <p> <? echo($sidebar1); ?> </p> <h2> What's on</h2> <? include('includes/frontpagetoday.php'); ?> <p> <a href="/events"> Details of these events and more</a> </p> </div> <div id="col3"> <h2> <? echo($sidebar2title); ?> </h2> <p> <? echo($sidebar2); ?> </p> <? $news = @mysql_query("SELECT ArtID, ArtTitle, ArtDate FROM Article WHERE ArtMsg LIKE '%Waterloo%' OR ArtTitle LIKE '%Waterloo%' OR ArtLead LIKE '%Waterloo%' ORDER BY ArtID DESC LIMIT 0,2"); if (!$news) { exit('<p>Unable to obtain news list from the database.</p>'); } ?> <h2>Local news</h2> <div class="smallnavcontainer"> <ul class="sectionnavlist"> <? while ($newsrows = mysql_fetch_array($news)) { $newsid = $newsrows['ArtID']; $newstitle = $newsrows['ArtTitle']; $newsdate = date("j F Y",strtotime($newsrows[ArtDate])); // Start The Background Check if($bgcolor == "#fff"){ $bgcolor = "#eee"; }else{ $bgcolor = "#fff"; } echo('<li class="smallnavlist" style="background-color:'.$bgcolor.';"> <strong> '.$newstitle.'</strong> <br/> '.$newsdate.'</li> '); } ?> </ul> </div> <p> <a href="/localnews"> See more local news</a> </p> </div> <? } include('includes/footer.php'); ?>
•
•
•
•
I'm not sure where to put my background image in this code and how to make the image transparent. Could you please help me out. Thank you
I am not sure what you mean to make the image transparent. The background is supposed to be on the bottom, so there should be nothing under it to be seen through it.
If something is fully transparent, you can't see it.
If you intend to make the image very light and barely visible (like a watermark), you need to modify the image with your graphics editor before you upload it to the web server. Adjust the brightness and contrast of the image to get this effect.
There is nothing in standard html/css that allows an image to be partly transparent. There are some nonstandard features that do not work on all browsers. And there are scripts that do not work on all computers.
I still do not see why you want a transparent image.
Last edited by MidiMagic; Sep 26th, 2009 at 2:36 am.
Daylight-saving time uses more gasoline
•
•
Join Date: Sep 2009
Posts: 14
Reputation:
Solved Threads: 1
Here's the CSS code for that:
css Syntax (Toggle Plain Text)
body { background-color:#E2E8FE; background-image:url(images/backgroundimage.jpg); }
Last edited by peter_budo; Oct 3rd, 2009 at 6:06 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks).
![]() |
Similar Threads
- Style Sheet + background (HTML and CSS)
- Problem with tkinter GUI creation with background image, text and buttons (Python)
- Setting a Background Image problem (PHP)
- Background image (C++)
- XHTML: No more cell background images? (HTML and CSS)
- Program running in the background and in the tray (C#)
- How do you put a background on a mp3 player? (Cellphones, PDAs and Handheld Devices)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- where to put .asp code into html code (ASP.NET)
- Can't Get Going with eVC++4.0 (C++)
Other Threads in the HTML and CSS Forum
- Previous Thread: CSS mozilla problems
- Next Thread: no file extension required
| 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






