By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

Layout Question.

P: n/a
First I'm pretty new to ASP.NET and I'm having a simple problem. I have
small website with a header, sidebar and the the content. I want my content
to appear beside my sidebar which seems to be a pretty standard layout.
However when ever I resize my browser the content resizes below the sidebar.

I've been digging through example websites can't seem to stop this
behaviour. I had one person suggest Tables but I see a few posts that say
you shouldn't use Tables with ASP.NET.

All I need is the topic to go look at. Any suggestions greatly appriciated.

Ed

May 2 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Ed,

Absolute purists will say that using tables for layout control is a bad
idea. These are CSS enthusiasts who, in my opinion, are a bit too
idealistic. Strictly speaking, using a table may not make sense for
controlling layout, but if it makes your site appear the way that you need
it to in all the browsers you intend to support, then use it.

As far as controlling how things are handled when the browser is resized,
there are some fundamentals to learn about CSS or inline html tag
attributes. Read some of the things here:
http://www.google.com/search?hl=en&q...=Google+Search

Ray at work
"Ed Sproull [MSFT]" <ed*****@online.microsoft.comwrote in message
news:03**********************************@microsof t.com...
First I'm pretty new to ASP.NET and I'm having a simple problem. I have
small website with a header, sidebar and the the content. I want my
content to appear beside my sidebar which seems to be a pretty standard
layout. However when ever I resize my browser the content resizes below
the sidebar.

I've been digging through example websites can't seem to stop this
behaviour. I had one person suggest Tables but I see a few posts that say
you shouldn't use Tables with ASP.NET.

All I need is the topic to go look at. Any suggestions greatly
appriciated.

Ed
May 2 '07 #2

P: n/a
Well you've implied you're not using tables, but you haven't mentioned what
technique you ARE using to try and align things.
I think tables are the easiest way to create such an arrangement and for the
most part I don't really buy into the whole "tables are bad" mentality as
long as they're used judiciously.
I say use tables and make your life easier.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Ed Sproull [MSFT]" <ed*****@online.microsoft.comwrote in message
news:03**********************************@microsof t.com...
First I'm pretty new to ASP.NET and I'm having a simple problem. I have
small website with a header, sidebar and the the content. I want my
content to appear beside my sidebar which seems to be a pretty standard
layout. However when ever I resize my browser the content resizes below
the sidebar.

I've been digging through example websites can't seem to stop this
behaviour. I had one person suggest Tables but I see a few posts that say
you shouldn't use Tables with ASP.NET.

All I need is the topic to go look at. Any suggestions greatly
appriciated.

Ed
May 2 '07 #3

P: n/a
Thanks for the replies! I’m just using <DIVwith formatting in the CSS
file. You can go look at it if you want at it
www.elsphoto.com\private\default.aspx
Ignore the header section, I got that under control by using the minimum
width setting but haven’t uploaded it.

Again I’m just a beginner at this but if you ever have any questions on the
internals of the windows shell , I’m in debt to you. 

Ed Sproull
Senior SDET Core User Experience
"Steve C. Orr [MCSD, MVP, CSM, ASP Inside" wrote:
Well you've implied you're not using tables, but you haven't mentioned what
technique you ARE using to try and align things.
I think tables are the easiest way to create such an arrangement and for the
most part I don't really buy into the whole "tables are bad" mentality as
long as they're used judiciously.
I say use tables and make your life easier.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Ed Sproull [MSFT]" <ed*****@online.microsoft.comwrote in message
news:03**********************************@microsof t.com...
First I'm pretty new to ASP.NET and I'm having a simple problem. I have
small website with a header, sidebar and the the content. I want my
content to appear beside my sidebar which seems to be a pretty standard
layout. However when ever I resize my browser the content resizes below
the sidebar.

I've been digging through example websites can't seem to stop this
behaviour. I had one person suggest Tables but I see a few posts that say
you shouldn't use Tables with ASP.NET.

All I need is the topic to go look at. Any suggestions greatly
appriciated.

Ed
May 2 '07 #4

P: n/a
I wouldn't label people who recommend divs over tables "Absolute Purists."
This implies an almost "religious" connotation to the practice. In fact, the
use of divs over tables is very practical. In terms of layout, divs and CSS
are much more flexible and extensible. A table locks the contained elements
into a specifically-ordered tabular format, while proper use of divs allows
content to be rearranged at will. As web sites generally evolve in terms of
layout, the ability to change layout without changing content is highly
cost-effective. It also enables the same XHTML element layout to be reused
in many applications without change, if structured correctly. By combining
div layout with ASP.Net Controls, such as substituting Panels for divs, you
further extend the flexibility and extensibility of the model.

I am not "averse" to using tables within pages, as they are clearly superior
for the display of data with a tabular and fixed format. Displaying database
data in a grid layout, for example, is probably best done with tables.
However, using tables for the page layout of entire pages is short-sighted,
in terms of design.

See http://csszengarden.com for some startling examples of the flexibility
and power of CSS with div layout.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Ray Costanzo" <my first name at lane 34 dot commercialwrote in message
news:91**********************************@microsof t.com...
Hi Ed,

Absolute purists will say that using tables for layout control is a bad
idea. These are CSS enthusiasts who, in my opinion, are a bit too
idealistic. Strictly speaking, using a table may not make sense for
controlling layout, but if it makes your site appear the way that you need
it to in all the browsers you intend to support, then use it.

As far as controlling how things are handled when the browser is resized,
there are some fundamentals to learn about CSS or inline html tag
attributes. Read some of the things here:
http://www.google.com/search?hl=en&q...=Google+Search

Ray at work
"Ed Sproull [MSFT]" <ed*****@online.microsoft.comwrote in message
news:03**********************************@microsof t.com...
>First I'm pretty new to ASP.NET and I'm having a simple problem. I have
small website with a header, sidebar and the the content. I want my
content to appear beside my sidebar which seems to be a pretty standard
layout. However when ever I resize my browser the content resizes below
the sidebar.

I've been digging through example websites can't seem to stop this
behaviour. I had one person suggest Tables but I see a few posts that
say you shouldn't use Tables with ASP.NET.

All I need is the topic to go look at. Any suggestions greatly
appriciated.

Ed

May 3 '07 #5

P: n/a
For the time being I used a Table to hold my Sidebar and Content to prevent
the content from jumping around when the window is resized.

If possible, could you give me the basic attributes that you would set in
CSS to have three DIV, horizontal across a page and not have them jump when
resizing the window? Currently I have a sidebar, a slide show and some text
and had to resort to the table to keep them horizontal. I've tried a bunch
of combinations of alignment and min-width but on resize to a small width
(smaller than the size of the three sections) my content wants to jump over
to the left and under the sidebar. If I set a margin-right it just resizes
below the sidebar.

Again thanks for your replies.

Ed
"Kevin Spencer" <un**********@nothinks.comwrote in message
news:ON**************@TK2MSFTNGP02.phx.gbl...
>I wouldn't label people who recommend divs over tables "Absolute Purists."
This implies an almost "religious" connotation to the practice. In fact,
the use of divs over tables is very practical. In terms of layout, divs and
CSS are much more flexible and extensible. A table locks the contained
elements into a specifically-ordered tabular format, while proper use of
divs allows content to be rearranged at will. As web sites generally evolve
in terms of layout, the ability to change layout without changing content
is highly cost-effective. It also enables the same XHTML element layout to
be reused in many applications without change, if structured correctly. By
combining div layout with ASP.Net Controls, such as substituting Panels for
divs, you further extend the flexibility and extensibility of the model.

I am not "averse" to using tables within pages, as they are clearly
superior for the display of data with a tabular and fixed format.
Displaying database data in a grid layout, for example, is probably best
done with tables. However, using tables for the page layout of entire
pages is short-sighted, in terms of design.

See http://csszengarden.com for some startling examples of the flexibility
and power of CSS with div layout.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Ray Costanzo" <my first name at lane 34 dot commercialwrote in message
news:91**********************************@microsof t.com...
>Hi Ed,

Absolute purists will say that using tables for layout control is a bad
idea. These are CSS enthusiasts who, in my opinion, are a bit too
idealistic. Strictly speaking, using a table may not make sense for
controlling layout, but if it makes your site appear the way that you
need it to in all the browsers you intend to support, then use it.

As far as controlling how things are handled when the browser is resized,
there are some fundamentals to learn about CSS or inline html tag
attributes. Read some of the things here:
http://www.google.com/search?hl=en&q...=Google+Search

Ray at work
"Ed Sproull [MSFT]" <ed*****@online.microsoft.comwrote in message
news:03**********************************@microso ft.com...
>>First I'm pretty new to ASP.NET and I'm having a simple problem. I have
small website with a header, sidebar and the the content. I want my
content to appear beside my sidebar which seems to be a pretty standard
layout. However when ever I resize my browser the content resizes below
the sidebar.

I've been digging through example websites can't seem to stop this
behaviour. I had one person suggest Tables but I see a few posts that
say you shouldn't use Tables with ASP.NET.

All I need is the topic to go look at. Any suggestions greatly
appriciated.

Ed

May 3 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.