Question:
How can I put text in this CSS coded box?
2009-12-24 13:38:07 UTC
this is my CSS code

@charset "UTF-8";
/* CSS Document */
body {
background-color: #e8ebe3;
margin:0;
color: #FFF;
text-align: left;
font-size: 18px;
}

.wrapper {
background-color: #f1f2ee;
margin:0 auto;
width:1024px;
text-align:left;

}

.header{
width:1024px;
height:90px;
background:#404040 url(../design/imagesheader/real.gif)

}
.header{
width:1024px;
padding-left:200px;
padding-top:45px;
height:86px;
background:#404040 url(../design/imageslogo/logoreal.gif) no-repeat
}
.nav{
width:1024px;
height:100px;
background: url(../design/imagesnavbarbackground/real.gif) no-repeat
}
.box {
width: 15em;
margin: 15px;
}
.box div.topleft {
display: block;
padding: 0.0em 1em 1em 1.0em;
border: black
}
.box div.topright {
display: block;
padding: 2.0em;
margin: -2.0em 0 0 2.0em;
border: black
}
.box div.bottomleft {
display: block;
height: 500px;
margin-top: -2.5em;
background: bottom left no-repeat white;
border: black
}


this is my HTML





Website | Home



















what I want to do is get text in the box I made in CSS what is the code to do this? I am a beginner at CSS and div tags for HTML so it might look like I am stupid
Three answers:
2009-12-24 19:14:56 UTC
Which box? You have "box", "topleft", "topright", "bottomleft" and "bottomright". Those are all "boxes". You have too many divs that are not nested or styled correctly to begin with. Bad case of div-itis.



Ron
Max
2009-12-24 17:14:57 UTC
each element can be given a CLASS attribute which is then styled using CSS. You have styled a class attribute named box and so you need a DIV element and label it with the box class:



YOUR TEXT HERE




Also please note that the bottom two DIV elements in your script have not been closed (
).



Good luck!
?
2016-10-06 07:40:19 UTC
What you prefer to do is somewhat greater more advantageous CSS. you additionally could make each and every of the tables and textual content textile packing containers you prefer in HTML, after which you may could desire to set this photograph because of fact the historical past for every physique; notwithstanding, basically putting the historical past photograph isn't sufficient. you may desire to set the historical past place and the excellent length of the HTML factor. working example: historical past-photograph: url('YOUR photograph URL'); historical past-place: XPOSpx YPOSpx; the place XPOS and YPOS are the x and y positions in pixels. this way, you may positioned in basic terms a particular area of the image because of fact the historical past of the factor.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...