/    Sign up×
Community /Pin to ProfileBookmark

Positioning A Header

I have a question in respect to positioning a header, and I hope I make Sense. Lol.

I want to create just a plain Red Header that it’s width expands the html document 100%. I thought I was doing it right, but after watching a Tutorial while in YouTube, I am more confused then ever. Lol.

I thought that when you create a Div that it’s width would span the html document, you would: width: 100%, and then: top: 0; left:0. Or maybe : margin: 0;. In the Tutorial, the only thing in the Header Div was { Background_color: #FFFFFF; } thats it. Who is right?

Also, how would i insert a Inner Header within the main Header and to so that it is Glued to the top as well?

Thank you

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@GyvastisAug 31.2011 — Well, firstly, #FFFFFF is not red color - it's white. That may be the issue.

The code should look something like this.

The content file (my example is html):
[CODE]
<html>
<head>
<link href="styles.css" type="text/css" rel="stylesheet" />
</head>
<body>

<div id="header">
<div>Here you can specify another div and store any data you want</div>
</div

</body>
</html>
[/CODE]


The styles.css file should look something like this.
[CODE]
#header {
background-color: #FFFFFF;
width: 100&#37;;
min-width: 800px;
height: 300px;
}
[/CODE]


Hope it helps.
Copy linkTweet thisAlerts:
@GyvastisAug 31.2011 — And change #FFFFFF to #FF0000.
Copy linkTweet thisAlerts:
@mooapoauthorAug 31.2011 — Thank you for pointing out that error. I don't know what I was thinking.
×

Success!

Help @mooapo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...