Welcome visitor
* Login
* Register
It is currently May 25th, 2019, 9:22 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Create a box (rectangle area) with a div
PostPosted: November 18th, 2009, 5:59 am 

Posts: 31
<style title="type/css">
#per{background-color: #4ee13a; width: 400px; height: 40px; display: inline}
</style>
<div id="per">a box</div>

I started this code using span instead of div but it would not create a box, only highlight the text inside the tags. That's why I changed to div but still there is not a box, just a background for the letters. How could I create a 400px box with a div?


Top
 Profile  
 
  Re: Create a box (rectangle area) with a div
PostPosted: November 18th, 2009, 8:39 am 
User avatar

Posts: 52
Just remove the inline display from the style tag. That's what is affecting the natural div behavior.
#per{background-color: #4ee13a; width: 400px; height: 40px}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron