4 replies [Last post]
tg95
tg95's picture
Offline
newbie
Last seen: 4 years 28 weeks ago
Timezone: GMT+1
Joined: 2015-05-22
Posts: 3
Points: 6

Hello all!
Im beginner for work css style, but i have one problem, on my code "footer" i put: width:100%;

and make a space: http://prntscr.com/77y82y

i try in another broswer and equals...

And i see in another websites : http://prntscr.com/77y8a8

Any can help me?

thanks for all, and sorry for my bad english ^^

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 15 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Hi tg95, As long as the

Hi tg95,
As long as the footer is a block level element it shouldn't need width:100%;
You may need to remove margin or padding from it or one of it's parents.

tg95
tg95's picture
Offline
newbie
Last seen: 4 years 28 weeks ago
Timezone: GMT+1
Joined: 2015-05-22
Posts: 3
Points: 6

humm ok thanks, and do you

humm ok thanks, and do you have code example?

I try remove this, and dont work :s

my code:

footer {
	background: #1a1a1a;
	width:100%;
	color: #666;
	padding:50px 0 0 0;
}
--------------------
html:
	<!-- footer -->
	<footer>
    test
 
	</footer>

thanks for help :b

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 15 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Can you link to an example

Can you link to an example page?
Might be as simple as

html, body{
    margin:0;
}

tg95
tg95's picture
Offline
newbie
Last seen: 4 years 28 weeks ago
Timezone: GMT+1
Joined: 2015-05-22
Posts: 3
Points: 6

thanks for help! Best Regards

thanks for help!

Best Regards