Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,958 members, 7,806,774 topics. Date: Tuesday, 23 April 2024 at 11:25 PM

Please Help!!.. Content Of <div> Are Crawling Out Of The Div - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Please Help!!.. Content Of <div> Are Crawling Out Of The Div (427 Views)

Learn Web Div... Fast And Easy / Help: Google Is Not Crawling My Blog / Google Unveils Its Best Content Of 2017 (2) (3) (4)

(1) (Reply) (Go Down)

Please Help!!.. Content Of <div> Are Crawling Out Of The Div by phililp(m): 1:23pm On Feb 21, 2017
dear webmasters.. am a newbie
am having a problem with my <body> and a <div> element


in the div i formated it like this

<div id="main">
then i put some text here in the body of the div
</div>

then css

#main {
width: 1000px;
height: 500px;
background-color: #dee4f7;
margin: 10px;
text-align: center;
padding: 20px;

}

the problem is; the text are crawling out of the div... thought there are supposed to break to the next line when there get to the end of the div
Re: Please Help!!.. Content Of <div> Are Crawling Out Of The Div by OTRebirth: 4:22pm On Feb 21, 2017
Are they bot crawlers?
.
.
.
Ok, i suggest you use 100% in your width instead of 1000px because of mobile response web. IF the text is somehow long, probable an explanation, use height: auto; instead of a fixed height.
On another note, why don't you change that #main to .main and use <div class='main'> instead of that.
.
.
Bro, after you get yourself a gmx bike with that ur website, don't forget a niqqa. Peace
Re: Please Help!!.. Content Of <div> Are Crawling Out Of The Div by donsheddy1(m): 4:24pm On Feb 21, 2017
Next time, you post your complete script.

Now avoid using heights when working with css *in time you'll understand why

Now just add this to your css

float:left;

Since i can't find your complete script here's a sample of what your code should look like

HTML

<!DOCTYPE html>
<html>
<head>
<title>Sample Page</title>
</head>
<body>
<div class="wrapper">
<div class="container">
<div id="main">
Some Dummy Texts here
</div>
</div>
</div>
</body>
</html>


CSS

.wrapper {
float:left;
width:100%;
}
.container {
width:1000px;
margin:0 auto;
}
#main {
width: 400px;
border:6px solid #dee4f7;
float:left;
}
Re: Please Help!!.. Content Of <div> Are Crawling Out Of The Div by dokunbam(m): 8:27pm On Feb 21, 2017
The topic is very funny grin grin

(1) (Reply)

We Are Looking For Expert Webinar Team Urgently / What Does NG Stand For? / 10,000 US Email Address List For Sale

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.