| View previous topic :: View next topic |
| Author |
Message |
randomperson9
Joined: 20 Nov 2007 Posts: 38
|
Posted: Sun Jan 27, 2008 4:30 pm header question in css |
|
|
|
I have a banner i put in the css code I am working on. I have a banner that does not fill up the header.
how do I make it so that the banner goes across the screen and fills the top of the screen (header) part of the css page? |
|
sticks464

Joined: 31 Dec 2006 Posts: 1283
|
Posted: Sun Jan 27, 2008 5:31 pm |
|
|
|
| What is the width of the banner? Some code would be nice. |
|
madprof
Joined: 26 Jan 2008 Posts: 98
|
Posted: Mon Jan 28, 2008 1:44 pm |
|
|
|
If the banner has a background colour that is solid then put the image centered in your head and make the header's background colour the same as the image's.
That way it looks like the image extends out. |
|
randomperson9
Joined: 20 Nov 2007 Posts: 38
|
Posted: Tue Jan 29, 2008 8:44 am |
|
|
|
| i have it as a css code now. and I was just thinking is there a way to put only a frame on the css page on the header? or is there another way to do it? |
|
madprof
Joined: 26 Jan 2008 Posts: 98
|
|
randomperson9
Joined: 20 Nov 2007 Posts: 38
|
Posted: Tue Jan 29, 2008 4:12 pm |
|
|
|
ummm frames may not work I was thinking about somthing else..
what I want to do is my banner on the css page is left but it is not touching the side of the page and I want it also to touch the top pf the page too so it is far left and far up to the top of the page as possible. is there a way to do this? |
|
madprof
Joined: 26 Jan 2008 Posts: 98
|
Posted: Wed Jan 30, 2008 12:26 pm |
|
|
|
Yeah totally. You can always absolutely position something to be top left by doing:
| Code: |
#my_top_div {
position: absolute;
top: 0px;
left: 0px;
}
|
But I think from what you are saying it may be simpler to just set margin on the body to be zero and make sure margins and padding for the top and left on any containing boxes are zero too.
Hope this helps. |
|
randomperson9
Joined: 20 Nov 2007 Posts: 38
|
Posted: Wed Jan 30, 2008 4:04 pm |
|
|
|
| so I put this next to my image to use this code. sorry I am a beginer at this stuff. and does my_top_div is where I put my picture? |
|
madprof
Joined: 26 Jan 2008 Posts: 98
|
Posted: Thu Jan 31, 2008 11:32 am |
|
|
|
In your HTML you don't put information about how things look but leave all this to a stylesheet - a separate file that you like in to your website.
You put this line between your <head> and </head> tags:
<link rel="stylesheet" href="/styles.css" type="text/css">
And then create a styles.css file in the root of your site i.e. the top folder. Then in there you can put all this style code and it'll just work.
You can embed style information in a specific HTML page BUT this info can't ever be re-used on other pages because it's not embedded in them! Instead, keep it all in one place and you can use it on any page where you've put in that <link> tag above. Saves lots of copying.
And yes this #my_top_div is where you put the image but you'll need the HTML to say this:
| Code: |
<div id="my_top_div">
...stuff goes here...
</div>
|
|
|
|