Go Back   SitePoint Forums > Forum Index > Design Your Site > Web Page Design > CSS
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Nov 8, 2009, 11:20   #1
aliqayyum
SitePoint Enthusiast
 
aliqayyum's Avatar
 
Join Date: Oct 2009
Posts: 75
how can i insert image in header?

hi
friends
i need your help! i wanted to add the image in replace of text and secondly , i wanted to add the adsense unit under the header
can any one help me
this is my blog http://jokewallpaper.blogspot.com/

thanks in advance
aliqayyum is offline   Reply With Quote
Old Nov 8, 2009, 13:01   #2
YuriKolovsky
Hibernator
 
YuriKolovsky's Avatar
 
Join Date: Nov 2007
Location: Malaga, Spain
Posts: 747
we had this interesting quiz recently, which i assume is what you want.
YuriKolovsky is online now   Reply With Quote
Old Nov 8, 2009, 21:09   #3
BlakeAnthony
Javascript Monstaa
 
BlakeAnthony's Avatar
 
Join Date: Jun 2008
Location: Cuyahoga Falls,Ohio
Posts: 1,228
HTML4Strict Code:
<div id="header" class="header section">
</div>
CSS Code:
#header, .header section {
    background:url('') no-repeat;
}
BlakeAnthony is offline   Reply With Quote
Old Nov 9, 2009, 01:04   #4
aliqayyum
SitePoint Enthusiast
 
aliqayyum's Avatar
 
Join Date: Oct 2009
Posts: 75
let me try
how can i can remove the sidebar boders
aliqayyum is offline   Reply With Quote
Old Nov 9, 2009, 01:44   #5
RyanReese
CSS Guru in Training
 
RyanReese's Avatar
 
Join Date: Oct 2008
Location: Whiteford, MD
Posts: 8,684
If you mean both sidebars, then on #left-sidebar-wrapper and #right-sidebar-wrapper you set a border:1px solid #4c4c4c.

Remove it.
RyanReese is online now   Reply With Quote
Old Nov 9, 2009, 02:00   #6
aliqayyum
SitePoint Enthusiast
 
aliqayyum's Avatar
 
Join Date: Oct 2009
Posts: 75
Quote:
Originally Posted by BlakeAnthony View Post
HTML4Strict Code:
<div id="header" class="header section">
</div>
CSS Code:
#header, .header section {
    background:url('') no-repeat;
}
which part i insert this code
aliqayyum is offline   Reply With Quote
Old Nov 9, 2009, 02:03   #7
aliqayyum
SitePoint Enthusiast
 
aliqayyum's Avatar
 
Join Date: Oct 2009
Posts: 75
Quote:
Originally Posted by RyanReese View Post
If you mean both sidebars, then on #left-sidebar-wrapper and #right-sidebar-wrapper you set a border:1px solid #4c4c4c.

Remove it.
thanks i removed it
aliqayyum is offline   Reply With Quote
Old Nov 9, 2009, 15:55   #8
RyanReese
CSS Guru in Training
 
RyanReese's Avatar
 
Join Date: Oct 2008
Location: Whiteford, MD
Posts: 8,684
Quote:
Originally Posted by aliqayyum View Post
thanks i removed it
No problem .

And Blake was responding to you're original question though he wasn't really specific and he basically just gave you code on how to place a background image on an element.
RyanReese is online now   Reply With Quote
Old Nov 9, 2009, 18:21   #9
aliqayyum
SitePoint Enthusiast
 
aliqayyum's Avatar
 
Join Date: Oct 2009
Posts: 75
Quote:
Originally Posted by RyanReese View Post
No problem .

And Blake was responding to you're original question though he wasn't really specific and he basically just gave you code on how to place a background image on an element.
but sir, i need exact help. kindly trace my code, and tell me, how should i change it
plz
aliqayyum is offline   Reply With Quote
Old Nov 9, 2009, 19:37   #10
ralph.m
Aiming for best practice
SitePoint Award Recipient
 
ralph.m's Avatar
 
Join Date: Mar 2009
Location: Melbourne, Australia
Posts: 1,035
In your CSS stylesheet, add the red code:
Code:
#header {
  margin: 5px;
  border: 1px solid #4c4c4c;
  text-align: center;
  color:#cccccc;
  background: transparent url(/images/background.jpg) no-repeat scroll 0 0;
}
The blue part will depend on where your image is located and what it is called.
ralph.m is offline   Reply With Quote
Old Nov 9, 2009, 20:16   #11
aliqayyum
SitePoint Enthusiast
 
aliqayyum's Avatar
 
Join Date: Oct 2009
Posts: 75
thanks for the help
how can i insert the adsense unit under the header image
aliqayyum is offline   Reply With Quote
Old Nov 9, 2009, 21:07   #12
RyanReese
CSS Guru in Training
 
RyanReese's Avatar
 
Join Date: Oct 2008
Location: Whiteford, MD
Posts: 8,684
Give the header iimage a...wait are you talkin about the header background image?

If so, and the header image stretches all the way across, you will need to give the header a top padding equal to the header images' height.

That way all content will start below it, then just place the adsense code in
RyanReese is online now   Reply With Quote
Old Nov 9, 2009, 21:14   #13
ralph.m
Aiming for best practice
SitePoint Award Recipient
 
ralph.m's Avatar
 
Join Date: Mar 2009
Location: Melbourne, Australia
Posts: 1,035
What do you mean? The adsense column is under the header. Do you mean horizontally?

By the way, I didn't notice that you wanted the header image to replace the text. You could move the text to one side if you wanted to.

Code:
h1 {text-indent: -9999px;}
A better way is to use an image replacement technique.
ralph.m is offline   Reply With Quote
Old Nov 9, 2009, 21:39   #14
aliqayyum
SitePoint Enthusiast
 
aliqayyum's Avatar
 
Join Date: Oct 2009
Posts: 75
Quote:
Originally Posted by ralph.m View Post
What do you mean? The adsense column is under the header. Do you mean horizontally?

By the way, I didn't notice that you wanted the header image to replace the text. You could move the text to one side if you wanted to.

Code:
h1 {text-indent: -9999px;}
A better way is to use an image replacement technique.
yeah! i m talking setting the horizontally adsense unit below the header text.
aliqayyum is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 11:18.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved