The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Unwanted space above and on the sides my header
jjordan33
post Jan 18 2020, 05:52 PM
Post #1





Group: Members
Posts: 9
Joined: 1-April 19
Member No.: 26,868



Hi, I have a header that I want to be at the very tip top, with no space above it, and to stretch the full width of the screen with no space on the sides. However, that is not what I have.

CODE
header {
    margin-top: 0;
    width:100%;
    background-color:#B7D39E;
}
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies(1 - 2)
pandy
post Jan 19 2020, 03:41 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,821
Joined: 9-August 06
Member No.: 6



You must also get rid of the margin or padding browsers add by default to BODY. See this FAQ entry.
https://htmlhelp.com/faq/html/effects.html#no-margins
Ignore the margintop and so on. That's very outdated. CSS is enough.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jjordan33
post Jan 19 2020, 02:10 PM
Post #3





Group: Members
Posts: 9
Joined: 1-April 19
Member No.: 26,868



Thank you. That took care of it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 6th June 2020 - 03:56 AM