Jump to content
AndyCanfield

Define A Rectangular Region

Recommended Posts

I am frustrated because this:

<div style='width:400px:height:150px;border:1px solid blue'>...</div>

does not give me a 400 by 150 pixel region on the page.(the 'border' could be background-color; it's just there toshow the region boundaries.) <div> always seems to be page width.The best I can get is with <td> (table cell),which will be no bigger than the enclosed contents. I want a "box" into which I can put thingsand those things will be inside the boxand the box will be around those thingswith the specified size.Exclusive - nothing else on the page will be inside the box(<\<div><img align='left' eats contents way past the </div>)! Is this even possible with HTML and CSS ?

Share this post


Link to post
Share on other sites

<div style='width:400px :height:150px; border:1px solid blue'>...</div>NB: correct the part marked with red. EDIT: you shouldn't be using an apostrophe (') to enclose html attribute's value(s), use quotation (") instead!

Edited by O. Samuel

Share this post


Link to post
Share on other sites

It makes no difference whether one uses an apostrophe or a quotation mark on HTML attributes, the specification indicates that both are equally valid.

Share this post


Link to post
Share on other sites
<div style='width:400px:height:150px;border:1px solid blue'>...</div>

You got mistakes in your code :) You don't use a semicolon in the first and the last properties. Try fixing those like below:
<div style='width:400px; height:150px; border:1px solid blue;'>...[/color][/color]</div>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...