ASP.NET Advertising Site

I am currently working on a website that is an advertising portal for business. Advertisers can create an account, choose various options for listing (staff, account, etc.), and the load of the graph is measured in multiple units. "Unit" is an image or flash file with a 180pxwide and 120high. An advertiser can select several units that are horizontal or vertical, i.e. Two separate blocks, horizontally aligned, or 2 separate elements, vertically aligned.

I got to the point that the site is working fine. I am stuck at the point where I am going to lay out the “units” and display them correctly, without any empty space between them. For example, if we had 4 advertisements, a horizontal ad 2 units, a vertical ad 2 units and 2 ad units, like this -

                  |
                  |
   2 unit ad      |   2 
------------------|  unit 
        |         |   ad
1 unit  | 1 unit  | 
        |         |
        |         |

I currently store advertising units in a database with attributes that are used in a web form to build a table (i.e., colspan, rowspan, etc.). I’m not sure if this is the right approach, I’m afraid that it is not. I would really appreciate it if I have any advice.

Thanks Indy

+3
source share
4 answers

. divs css, . , divs , . , .

<html>
<head>
    <style>
        div.adcontainer {
            margin: 0px; width: 540px;
        }
        div.ad {
            float: right; margin: 0; padding: 0; width: 180px;
            height: 120px; background: #DDD;
        }
        div.adhorz {
            width: 360px; height: 120px;
        }
        div.advert {
            width: 180px; height: 240px;
        }
    </style>
</head>
<body>
    <div class="adcontainer">
        <div class="ad advert">ad v</div>
        <div class="ad adhorz">ad h</div>
        <div class="ad">ad 1</div>
        <div class="ad">ad 2</div>
    </div>
</body>
</html>
0

IMHO , rowspan-is colspan-ish. , .

, HTML , , cellspacing = "0" cellpadding = "0", .

<table cellspacing="0" cellpadding="0" border="0">

:
HTML,

table 
{ 
    border-collapse: collapse; 
}

CSS.

+2

, , ? ? cellspacing = "0" cellpadding = "0"?

.

<table cellspacing="0" cellpadding="0">

, . , . , , , .

+1

- TreeMap? , .

0

All Articles