I am still a newbie to html and css, seeing as I have been working with c++ and python for quite so time, and have been having trouble with the div tag. Whenever I decalre a div tag and make the background-color: black it tends to go across the screen, is there a way to make it so that the background color does not move all the way across the screen? Also I would like to know if it is possible to make the div tag's background-color automatically go all the way down the screen, thank you.
thekitoper
0
Newbie Poster
Recommended Answers
Jump to PostThere is an html attribute called "width". You can specify an element's width with this attribute.
Do a quick google search for css and you shall get along pretty good.
Jump to Postto make it go all the way down the screen there's a trick:
<div style="width:500px;top:0;bottom:0;margin:auto;"> </div>
All 5 Replies
ndeniche
402
Posting Virtuoso
Featured Poster
ndeniche
402
Posting Virtuoso
Featured Poster
thekitoper
0
Newbie Poster
ndeniche
402
Posting Virtuoso
Featured Poster
thekitoper
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.