SP .NET web pages. So that they will suit to the computer s

Dani AI

Generated

The original post is ambiguous, but the answers from and point toward the right goal: make pages adapt to different screen sizes and resolutions (responsive design) and avoid fixed pixel sizing. Below is a compact, practical checklist and a small CSS/HTML starter to apply site-wide in an ASP.NET project.

Add to the shared layout or master page: a viewport meta tag and a small set of responsive rules. Use percent/max-width for layout, rem/em for type, media queries for breakpoints, and max-width:100% for images. Wrap large tables so they can scroll on narrow screens (GridView and other server controls often emit wide tables).

<!-- put in <head> of _Layout.cshtml or MasterPage -->
<meta name="viewport" content="width=device-width, initial-scale=1">

/* basic responsive helpers */
.container { max-width:1100px; margin:0 auto; padding:0 15px; box-sizing:border-box; }
.col { float:left; width:100%; box-sizing:border-box; }
@media (min-width:600px) { .col { width:50%; } }
@media (min-width:1000px) { .col { width:33.333%; } }

img { max-width:100%; height:auto; display:block; }
.table-wrapper { overflow-x:auto; -webkit-overflow-scrolling:touch; }

For ASP.NET specifics: put common meta and CSS links into the project layout (MVC _Layout or WebForms MasterPage). Replace inline width/height attributes and server-control inline styles with CssClass and stylesheet rules. For data-heavy controls, enable paging or render a mobile-friendly summary; alternatively wrap tables in a .table-wrapper to avoid layout breakage. Use bundling/minification or a build pipeline so the responsive CSS is loaded efficiently.

Testing and troubleshooting: use browser devtools device emulation, resize the window, and test high-DPI scaling. Remember responsive design is intentional: define breakpoints that match content needs rather than device models. ’s and ’s tips are good starting points; combine them with the layout and control adjustments above for a robust solution.

Recommended Answers

All 4 Replies

Your post seems incomplete and doesn't make much sense. Please clarify your question.

css styling, in em or % instead of pixels is a good place to start

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.