HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
header question in css
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
randomperson9



Joined: 20 Nov 2007
Posts: 38

PostPosted: Sun Jan 27, 2008 4:30 pm     header question in css Reply with quote

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

PostPosted: Sun Jan 27, 2008 5:31 pm     Reply with quote

What is the width of the banner? Some code would be nice.
madprof



Joined: 26 Jan 2008
Posts: 98

PostPosted: Mon Jan 28, 2008 1:44 pm     Reply with quote

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

PostPosted: Tue Jan 29, 2008 8:44 am     Reply with quote

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

PostPosted: Tue Jan 29, 2008 2:30 pm     Reply with quote

You mean so the header stays where it is? Yes you can do this with a frame, but I'm afraid I could only point you at:
http://www.htmlhelp.com/reference/html40/frames/frameset.html

Someone else might be able to reel off some code for you though.
randomperson9



Joined: 20 Nov 2007
Posts: 38

PostPosted: Tue Jan 29, 2008 4:12 pm     Reply with quote

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

PostPosted: Wed Jan 30, 2008 12:26 pm     Reply with quote

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

PostPosted: Wed Jan 30, 2008 4:04 pm     Reply with quote

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

PostPosted: Thu Jan 31, 2008 11:32 am     Reply with quote

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>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial