Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to make the content Fixed

How to make the content Fixed

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdesignhelptutorial
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    the exile
    wrote on last edited by
    #1

    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

    R D 2 Replies Last reply
    0
    • T the exile

      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

      R Offline
      R Offline
      Ravi Sant
      wrote on last edited by
      #2

      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.

      T 1 Reply Last reply
      0
      • R Ravi Sant

        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.

        T Offline
        T Offline
        the exile
        wrote on last edited by
        #3

        thankls alot but the problem I dont have experience in using css :( :( :( :(

        R 1 Reply Last reply
        0
        • T the exile

          thankls alot but the problem I dont have experience in using css :( :( :( :(

          R Offline
          R Offline
          RaviRanjanKr
          wrote on last edited by
          #4

          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][^]

          T 1 Reply Last reply
          0
          • T the exile

            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

            D Offline
            D Offline
            Dalek Dave
            wrote on last edited by
            #5

            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[^]

            T 1 Reply Last reply
            0
            • R RaviRanjanKr

              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][^]

              T Offline
              T Offline
              the exile
              wrote on last edited by
              #6

              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

              M 1 Reply Last reply
              0
              • D Dalek Dave

                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[^]

                T Offline
                T Offline
                the exile
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • T the exile

                  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

                  M Offline
                  M Offline
                  msqar
                  wrote on last edited by
                  #8

                  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,

                  T 1 Reply Last reply
                  0
                  • M msqar

                    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,

                    T Offline
                    T Offline
                    the exile
                    wrote on last edited by
                    #9

                    from my heart thank you soooooooooooooooooooooooooo much

                    M 1 Reply Last reply
                    0
                    • T the exile

                      from my heart thank you soooooooooooooooooooooooooo much

                      M Offline
                      M Offline
                      msqar
                      wrote on last edited by
                      #10

                      You are very welcome, pal! :D

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups