D
David
I'm having trouble with the looks of an asp.net Master page.
What I want is a header that has two rows, and then the individual page
content under that. On the left is a large area with some introductory text,
covering 70% of the row. (i.e."Welcome to my cool web page, etc....") On
the right, the page logo, at a width of 30% of the page. In the second row,
5 commonly used navigation hyperlinks. The rest of the page is page specific
content.
So, I tried the following pseudo-markup.
<asp:table>
<asp:tablerow width="100%">
<asp:tablecell width="70%">Intro text</asp:tablecell>
<asp:tablecel witdth="30%"><asp:image logo/></asp:tablecell>
</asp:tablerow>
<asp:tablerow widht="100%>
<asp:tablecell width="20%"><asp:hyperlink
Text="Home".../></asp:tablecell>
<.....insert four more table cells, width 20% here>
</asp:tablerow>
<asp:tablerow width="100%">
<asp:contentplaceholder ..../>
<asp:tablerow>
It didn't work. I guess the tablecells end up lining up with each other,
and the second of the hyperlinks from the second row ended up next to the
logo. After much messing around with asp:tables and <table><tr><td> tags, I
decided to go with style sheets.
I tried the following psuedomarkup:
style sheet:
..UpperBanner
{
width:70%;
}
..Logo
{
width:30%;
}
..MenuItem
{
width:20%
}.
And the markup:
<div class="UpperBanner">Intro Text</div>
<div class="Logo"><asp:image logo/></div>
<br/>
<div class="MenuItem">Nav link 1</div>
<div class="MenuItem">Nav link 2</div>
<div class="MenuItem">Nav link 3</div>
<div class="MenuItem">Nav link 4</div>
<div class="MenuItem">Nav link 5</div>
<br>
<div>
<asp:ContentPlaceHolder ..../>
</div>
Everything was the correct size, but each "div" started at a new line. I
tried various combinations of "left" values and "position" values, but no
luck. I found a couple of examples, but all of them featured absolute
positioning using pixel values, which I wanted to avoid.
I also tried <tr> and defining 10 <td? elements, each wtih a width of 10%,
and using columnspan attributes to take up different 10% chunks of space, but
that didn't work.
Is there a good, web accessible, description of using either divs, <table>s
or <asp:table>s to do a web layout where the elements of each row are of
different witdths? What I really want is three rows of stuff. The first row
has two elements. 70% on the left side, 30% on the left. The second row has
five adjacent elements, each taking up 20%. The third row has a single
element that takes up 100% of the screen width.
What I want is a header that has two rows, and then the individual page
content under that. On the left is a large area with some introductory text,
covering 70% of the row. (i.e."Welcome to my cool web page, etc....") On
the right, the page logo, at a width of 30% of the page. In the second row,
5 commonly used navigation hyperlinks. The rest of the page is page specific
content.
So, I tried the following pseudo-markup.
<asp:table>
<asp:tablerow width="100%">
<asp:tablecell width="70%">Intro text</asp:tablecell>
<asp:tablecel witdth="30%"><asp:image logo/></asp:tablecell>
</asp:tablerow>
<asp:tablerow widht="100%>
<asp:tablecell width="20%"><asp:hyperlink
Text="Home".../></asp:tablecell>
<.....insert four more table cells, width 20% here>
</asp:tablerow>
<asp:tablerow width="100%">
<asp:contentplaceholder ..../>
<asp:tablerow>
It didn't work. I guess the tablecells end up lining up with each other,
and the second of the hyperlinks from the second row ended up next to the
logo. After much messing around with asp:tables and <table><tr><td> tags, I
decided to go with style sheets.
I tried the following psuedomarkup:
style sheet:
..UpperBanner
{
width:70%;
}
..Logo
{
width:30%;
}
..MenuItem
{
width:20%
}.
And the markup:
<div class="UpperBanner">Intro Text</div>
<div class="Logo"><asp:image logo/></div>
<br/>
<div class="MenuItem">Nav link 1</div>
<div class="MenuItem">Nav link 2</div>
<div class="MenuItem">Nav link 3</div>
<div class="MenuItem">Nav link 4</div>
<div class="MenuItem">Nav link 5</div>
<br>
<div>
<asp:ContentPlaceHolder ..../>
</div>
Everything was the correct size, but each "div" started at a new line. I
tried various combinations of "left" values and "position" values, but no
luck. I found a couple of examples, but all of them featured absolute
positioning using pixel values, which I wanted to avoid.
I also tried <tr> and defining 10 <td? elements, each wtih a width of 10%,
and using columnspan attributes to take up different 10% chunks of space, but
that didn't work.
Is there a good, web accessible, description of using either divs, <table>s
or <asp:table>s to do a web layout where the elements of each row are of
different witdths? What I really want is three rows of stuff. The first row
has two elements. 70% on the left side, 30% on the left. The second row has
five adjacent elements, each taking up 20%. The third row has a single
element that takes up 100% of the screen width.