How to make the content Fixed
-
hi men/women actually when I design the page in asp.net (in c#) I arrange the contents in specific way , but when make "browse in web page" the contents overlapping and some of them get bigger and another get smaller and some move from original position ....etc. I tried to use tables to make the content fixed , I also tried to use the percent in size of tables, td and tr but with no useful can any one help me and tell me what is the suitable way to make the content the same in the design and browsing mode
-
hi men/women actually when I design the page in asp.net (in c#) I arrange the contents in specific way , but when make "browse in web page" the contents overlapping and some of them get bigger and another get smaller and some move from original position ....etc. I tried to use tables to make the content fixed , I also tried to use the percent in size of tables, td and tr but with no useful can any one help me and tell me what is the suitable way to make the content the same in the design and browsing mode
From my personal experience, i recommend using css and avoiding tables. I prefer measurements in pixels and it makes it more sure. check some best practices here.
-
From my personal experience, i recommend using css and avoiding tables. I prefer measurements in pixels and it makes it more sure. check some best practices here.
-
the exile wrote:
but the problem I dont have experience in using css :( :( :(
hmm! you can solve your problem by learning CSS for this you can start from there-[Learn CSS step by Step][^] and there-[W3Schools][^]
-
hi men/women actually when I design the page in asp.net (in c#) I arrange the contents in specific way , but when make "browse in web page" the contents overlapping and some of them get bigger and another get smaller and some move from original position ....etc. I tried to use tables to make the content fixed , I also tried to use the percent in size of tables, td and tr but with no useful can any one help me and tell me what is the suitable way to make the content the same in the design and browsing mode
Tables is an outdated method. Use <DIV> tags and float or position them. Can put DIVs inside DIVs and use CSS Tables for formating. You can nest a table in a DIV, but DIV is the correct method du jour.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]
-
the exile wrote:
but the problem I dont have experience in using css :( :( :(
hmm! you can solve your problem by learning CSS for this you can start from there-[Learn CSS step by Step][^] and there-[W3Schools][^]
-
Tables is an outdated method. Use <DIV> tags and float or position them. Can put DIVs inside DIVs and use CSS Tables for formating. You can nest a table in a DIV, but DIV is the correct method du jour.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]
thanks alot for your time and reply I would like to ask you which way is perfect when I determine the size of tables or DIVs either pixel or the percent actully that I know is the pixel size will not fit with all browser or computers Is it true? thanks alot again
-
thank you so much for your time can you please give some examples (web app or website) if you have time because I dont know how to merage css with asp.net c# thanks alot another time
Its easy to add CSS in ASP.NET, as you do in HTML. The code will be basically look like this:
Or you can even place it in the same masterpage like this, inside of the head tag, you add:
<i>CSS ATTRIBUTES </i>
For instance, if you are using master pages, you have to add the css links inside of it (the masterpage). I'm not a MASTER of web development, but i can help you with something... CSS its easy as well, gonna make some examples for you. Lets say we have the filename.css with: body { background-color: #1e1e1e; margin: 0px; text-align: center; font-family: Trebuchet MS; } The entire webpage if I let it this way, the font will be Trebuchet MS and it will be centered. You have 3 ways for applying CSS. By ID, by Class or by Object. By ID: (ASP.NET)
(CSS)
#foo
{
color: #282828;
font-size: 12px;
font-family: Arial;
border: 1px solid #fff;
}Here, this ASP input text will have a 1px solid white border, the color of the text inside of it will be grey, Arial and 12px size. By Class (ASP.NET)
(CSS)
.input
{
color: #282828;
font-size: 12px;
font-family: Arial;
border: 1px solid #fff;
}This will contain the same attributes, but the only difference is that we changed them by class instead of ID. If you have a lot of inputs its better for you to use classes rather than ID, ID is more unique related style, -when you have to change a single object style-. Then you can also change all the inputs, all the selects, and so on of your site, like this:
input
{
color: #282828;
font-size: 12px;
font-family: Arial;
border: 1px solid #fff;}
Where ALL the inputs will be under these style rules. Next for you to know, is the positions, margins, paddings and floats. Try to avoid using position: absolute or tables as one person said above, they aren't good, conceptually neither. So the best way for you to create forms for example, is with DIVs and CSS, is even way better for reading and understanding. After doing both ways, you realise of the quantity of lines used for nothing with tables and the worthless space they use. Also, by using tables, each browser (firefox, chrome, opera, IE) has their own attributes for placing elements inside of rows/columns,
-
Its easy to add CSS in ASP.NET, as you do in HTML. The code will be basically look like this:
Or you can even place it in the same masterpage like this, inside of the head tag, you add:
<i>CSS ATTRIBUTES </i>
For instance, if you are using master pages, you have to add the css links inside of it (the masterpage). I'm not a MASTER of web development, but i can help you with something... CSS its easy as well, gonna make some examples for you. Lets say we have the filename.css with: body { background-color: #1e1e1e; margin: 0px; text-align: center; font-family: Trebuchet MS; } The entire webpage if I let it this way, the font will be Trebuchet MS and it will be centered. You have 3 ways for applying CSS. By ID, by Class or by Object. By ID: (ASP.NET)
(CSS)
#foo
{
color: #282828;
font-size: 12px;
font-family: Arial;
border: 1px solid #fff;
}Here, this ASP input text will have a 1px solid white border, the color of the text inside of it will be grey, Arial and 12px size. By Class (ASP.NET)
(CSS)
.input
{
color: #282828;
font-size: 12px;
font-family: Arial;
border: 1px solid #fff;
}This will contain the same attributes, but the only difference is that we changed them by class instead of ID. If you have a lot of inputs its better for you to use classes rather than ID, ID is more unique related style, -when you have to change a single object style-. Then you can also change all the inputs, all the selects, and so on of your site, like this:
input
{
color: #282828;
font-size: 12px;
font-family: Arial;
border: 1px solid #fff;}
Where ALL the inputs will be under these style rules. Next for you to know, is the positions, margins, paddings and floats. Try to avoid using position: absolute or tables as one person said above, they aren't good, conceptually neither. So the best way for you to create forms for example, is with DIVs and CSS, is even way better for reading and understanding. After doing both ways, you realise of the quantity of lines used for nothing with tables and the worthless space they use. Also, by using tables, each browser (firefox, chrome, opera, IE) has their own attributes for placing elements inside of rows/columns,