Jump to content

[SOLVED] Problem with the blockquote's width and title


Recommended Posts

Hi,

I'm trying to make a design for a blog and found only one problem: the blockquote.

When to cite something, the most of blog systems generate a blockquote.

I'm testing with 3 browsers: IE6, Firefox and Opera, and in all browsers the same thing:

The css:

blockuote {
...
width: 500px;
display: block;
...
}
code {
...
width: 500px;
display: block;
...
}

 

In the html, a blockquote and a code to compare.

 

Whatever I do, the blockquote box still larger than the code box.

 

Someone can help me with it?

 

thanks

 

PS: bad english

really? oh! sorry! my bad!!!!

I know I had to copy&paste my code but i didn't... and I had not much time to write the post... so... let's copy&paste!

The CSS:

blockquote {
background-color: #444;
border: dotted 1px #ddd;
width: 500px;
display: block;
margin: 20px auto;
padding: 5px 30px 5px 30px;
}
code {
background-color: #444;
border: dashed 1px #ddd;
width: 500px;
display: block;
margin: 20px auto;
padding: 5px 5px 5px 30px;
overflow: auto;
white-space: nowrap;
}

 

and the interesting part of body:

<blockquote>Blockquote cites something.<br />
Don't it?</blockquote>
<code>Code{<br />
 with more than one line<br /> 
 to test the box<br />
 and here is a extremelly long line to test the wrap of this box. in case of nowrap may appear some scroll bar on the bottom of this box, but only on bottom!<br />
 But not in every browser I think.. IE displays a vertical scroll bar.<br />
}</code>

 

Good enough to understand my need for really helping answers?

Thanks

Simple enough. When you add padding, you make the box bigger to accomodate the padding, right? so basically, your blockquote box is 560px (500+30+30) whereas your code box is 535 (500+5+30). Try copying and pasting the padding for the boxes so that they're identical.

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.