I'm having trouble getting some basic understandings of how web pages, specifically developed using Visual Studio 2008, are constructed.
The code below started as an empty Default.aspx page to which I added only an asp:Label and an asp:TextBox.
When I added only a font-family to the <body>, the font of the TextBox doesn't change. Why not?
The actual browser I'm starting with is IE8 and I have seen slight differences from trying to use FireFox. But I don't even want to begin talking about browser inconsistencies yet.
On another message board, someone suggested adding a set of reset CSS which I obtained from Eric Meyer's site. That didn't make any difference and I don't really see why it was suggested.
I believe that, whatever the concept is that I am missing, it lies at the base of understanding web pages in general, and CSS in particular.
Can anyone point out what I'm missing or doing wrong?
Here's the code:
The code below started as an empty Default.aspx page to which I added only an asp:Label and an asp:TextBox.
When I added only a font-family to the <body>, the font of the TextBox doesn't change. Why not?
The actual browser I'm starting with is IE8 and I have seen slight differences from trying to use FireFox. But I don't even want to begin talking about browser inconsistencies yet.
On another message board, someone suggested adding a set of reset CSS which I obtained from Eric Meyer's site. That didn't make any difference and I don't really see why it was suggested.
I believe that, whatever the concept is that I am missing, it lies at the base of understanding web pages in general, and CSS in particular.
Can anyone point out what I'm missing or doing wrong?
Here's the code:
Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="TestDefaults._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <style type="text/css"> /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } </style> <title></title> </head> <body> <form id="form1" runat="server" style="font-family: 'Trebuchet MS', Helvetica, Sans-Serif;"> <div> <asp:Label ID="Label1" runat="server" Text="AaBbCcDdEeFfGgHhIiJjKkLlMmTt" /> <br /> <asp:TextBox ID="TextBox1" runat="server" Width="400" Text="AaBbCcDdEeFfGgHhIiJjKkLlMmTt" /> </div> </form> </body> </html>
Comment