Computing.Net > Forums > Web Development > How do I place a background image?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How do I place a background image?

Reply to Message Icon

Name: ShaqDiesel
Date: May 23, 2008 at 13:24:57 Pacific
OS: winXP
CPU/Ram: Amd64/1Gb
Product: custom
Comment:

I have a pulldown menu I want to superimpose on a background image. How do I do this? So far I have done:

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

<body>
<div id="searchbar">
<select>
<option value ="value1">Value 1</option>
<option value ="value2">Value 2</option>
</select>
<input type="text" name="searchbar" size="30" />

# searchbar
{
background-image:
url(images/searchbar.jpg);
}

Also, I want to have another div on the same line for my submit button. How do I do this if a div puts a line break after its content? Thank you.



Sponsored Link
Ads by Google

Response Number 1
Name: FlyByNight
Date: August 3, 2008 at 18:48:21 Pacific
Reply:

1. In HTML code, change "name" to "id"
<input type="text" name="searchbar" size="30" />

2. No space between "#" and "searchbar" in the stylesheet.

3. Create a new DIV which will be positioned over the one containing your background.

#searchbar
{
background-image: url(images/searchbar.jpg);
}
#dropMenu
{
position: absolute;
margin-left: 100px;
margin-top: -50px;
}

You'll have to play with those margins, of course, but that will allow you to place your divs anywhere that you want them.

Remote Support: Submit Ticket

Instant Message:
Yahoo: GreyStormMedia
AOL: GreyStormMedia
MSN: GreyStormMedia@GMail.com


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: How do I place a background image?

How do i do this? www.computing.net/answers/webdevel/how-do-i-do-this/1463.html

How do I put a chatroom on my site? www.computing.net/answers/webdevel/how-do-i-put-a-chatroom-on-my-site/2250.html

how do I create a search option www.computing.net/answers/webdevel/how-do-i-create-a-search-option-/3057.html