Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Margin problem

Reply
Thread Tools

Margin problem

 
 
Brian Tozer
Guest
Posts: n/a
 
      05-08-2004
In the following site:-

http://members.cox.net/netlane-desig...nedesigns.html

when I add extra content to the bordered content area at the right of the
menu box, the content box height expands as expected, until it's bottom
border is below the bottom of the viewport.
Using CSS I have been unable to create a 20px margin below the content box
so that there is background image visible there.
I am somewhat familiar with CSS and have tried many semi-obvious things to
no avail.
Any help would be appreciated.

Brian Tozer


 
Reply With Quote
 
 
 
 
Mitja
Guest
Posts: n/a
 
      05-08-2004
Brian Tozer <(E-Mail Removed)>
(news:c7jl6k$3sr$(E-Mail Removed)) wrote:
> In the following site:-
>
> http://members.cox.net/netlane-desig...nedesigns.html
>
> when I add extra content to the bordered content area at the right of
> the menu box, the content box height expands as expected, until it's
> bottom border is below the bottom of the viewport.
> Using CSS I have been unable to create a 20px margin below the
> content box so that there is background image visible there.
> I am somewhat familiar with CSS and have tried many semi-obvious
> things to no avail.
> Any help would be appreciated.
>
> Brian Tozer


Because you use absolute positioning. Absolutely positioned elements don't
take any space in structure flow, so the margin doesn't count because your
div is non-existent as far as the flow is concerned. Use something like

div#content {

border-right: #444 5px solid;

padding-right: 10px;

border-top: #444 5px solid;

padding-left: 10px;

margin-right: 25px;

background: #000000;

margin-left: 170px;

padding-bottom: 10px;

font: 13px arial, sans-serif;

border-left: #444 5px solid;

color: #678062;

padding-top: 10px;

border-bottom: #444 5px solid;

/*position: absolute;*/

margin-top: 60px;

margin-bottom: 100px;

}


 
Reply With Quote
 
 
 
 
Whitecrest
Guest
Posts: n/a
 
      05-08-2004
In article <c7jl6k$3sr$(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> In the following site:-
> http://members.cox.net/netlane-desig...nedesigns.html


Too hard to read it, the green shades are too close for people with
Deuteranopia

--
Whitecrest Entertainment
www.whitecrestent.com
 
Reply With Quote
 
Brian Tozer
Guest
Posts: n/a
 
      05-08-2004

"Mitja" wrote

> Because you use absolute positioning. Absolutely positioned elements don't
> take any space in structure flow, so the margin doesn't count because your
> div is non-existent as far as the flow is concerned.


Wonderful. Thanks very much Mitja.
Another lesson learnt.
Brian


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to have margin-left: 10%; margin-right: 10%; only sometimes?? Cal Who ASP .Net 4 05-17-2010 12:17 PM
How to have margin-left: 10%; margin-right: 10%;" only sometimes Cal Who ASP .Net 1 05-16-2010 08:53 PM
Epson 4000 - margin to margin? nobody Digital Photography 6 03-28-2005 05:17 PM
"margin-top" style problem Patrick J. Kearney HTML 3 06-21-2004 05:13 AM
Margin problem with crystal report aspx Infocde ASP .Net 0 11-27-2003 09:38 PM



Advertisments