[thelist] CSS padding with 100% width?

Chris.Marsh at Callserve.com Chris.Marsh at Callserve.com
Fri Jan 14 09:30:31 CST 2005


Dmitry

> On Friday, 14-Jan-2005 14:47, Chris.Marsh at Callserve.com wrote:
> > Is there some reason you can't do the following (styles inline for
> > illustration only):
> 
> no, look here is the website:
> http://www.foodcomponent.com
> 
> it has a borders done by background color of 6 div's
> 
> and each div has a 100% width
> 
> so we see at the right now overlapping. :-(
> but in IE all is ok.
> 
> I dunno what to do to fix it. There is the solution to make a 
> backgrounds like 
> images, but I want to have a borders as background colors 
> cause when images 
> are turned off it will look ok.

What a total nightmare. The content is nested 6 divs deep just so that the
border can be a bit blurred? Why don't you approach this from the other
direction, and created semantically meaningful markup and then format it
from there using CSS?

Why are you setting the width to 100%? As I understand it, if you set the
padding correctly for the body element, the divs will automaticall extend
across the available area as they are block level elements. Consider the
effort to return ratio - is it worth it for this tiny design requirement?
Consider the implications - how will these deeply nested tags affect your
search engine rankings? Consider the options - can you compromise? Check out
<http://www.w3schools.com> as a reference, and in this case specifically
<http://www.w3schools.com/css/pr_border-style.asp>. Would one of these
borders suffice? Imagine the optimisation to your code if you could use a
single div with a border-style specified that fits your criteria to an
acceptable degree.

HTH

Regards

Chris Marsh

_______________________________________________________________________
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender and delete the email immediately. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. 

Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.

Finally, the recipient should check this email and any attachments for the presence of viruses. Callserve Communications accepts no liability for any damage caused by any virus transmitted by this email. _______________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service.


More information about the thelist mailing list