I was given a website in ASP.NET and I have to change the look of it by adjusting and fixing the div tags etc. What is the easiest way I can learn how to do this efficiently? The previous user was making use of tables to set the images etc
Thanks
You need to redesign the complete website or just change some setting keeping table layout.
table is good for displaying for rows and column data.
but in any case you need to use CSS Cascading Style Sheets www.w3schools.com/css/default.asp
Its easy to work in asp.net, just create masterpage and it will help you manage your design. and give a same look to all pages.
I hope it help you.
Related
I really wonder how such websites like https://medium.com/ (on the home page) https://qz.com divide the page according to tags or the order is like : header, some news, some articles in same shaped boxes,video, then some more content and then footer... so in one page they are able to show many things.. is that done by dividing page with HTML div tags or is there something else used ? I am a newbie trying to learn Django. I appreciate any help
I think there is more than just div-tags, but in the end it is (only) html, css and javascript that creates the visual webside on the clients' side.
Frameworks like the "960 Grid System" or Bootstraps Grid System can help you to keep content in a common order. Create templates for your CMS to achive a common design (Ahhhh: Use a CMS). Maybe use Less, Saas, etc. instead of writing plain old css-files.
Short answer: Look at their code. Of course you can't see their server-side code, but you can look at the HTML and it clearly shows that medium uses divs, while qz uses sections.
Now as to what you can use, there really isn't anything else. Simply because there isn't any need for it. You might want to add an uniform height for each of those "sections", but you don't need to.
Now to the serverside part: they certainly didn't hardcode every single section, but created a template for it. Depending on what technology they use that will look different, but it will always have
A template (often called function, template or module depending on the technology used) that has everything ready as to the HTML and CSS. This designs the layout and design of those 'sections'. It also accepts content that it will then insert into that structure.
A 'main-page' that uses that template repeatedly, but gives it different information. For Medium this might be something like: MakeStreamItem("Audio", GetFirstFourAudioItems())
I am using asp.net/C# ,, i have a form with many fields ,,, it is a registeration form of a bank ... currently i usd css to move and align fields on the form ...i didnot use the drag n drop feature .... My question is what would be the best way to manage such forms .. currently my form doesnot look organized... Should i use absolute positioning and align all my fields by dragging them .... Please suggest me the proper way of aligning and organizing such fields.
Thanks
Simple semantic html - validated of course
with css for styling is the recommended way.
Regarding absolute positioning or not - that depends.
There are lots of example CSS Form sites, with examples and source code. I suggest you look there.
If you have a huge amount of fields you can break the page up into smaller pages (save each segment, allow back and next). If you are feeling brave you can use the Web Forms Wizard control - but I wouldn't personally as Web Forms has a way of turning on you.
With VS 2003 we were used to desing the web forms quite similarly to win forms: the Textboxes, Labes, Buttons etc. were positioned with absolute coordinates (inline css) in divs with ms_positioning="GridLayout".
With VS 2010 this way of designing web forms seems to be gone (at least it can no more be used to get the design finished quickly) and the use of absolute coordinates and inline css is considered obsolete anyway.
I would like to get some hints how to design web forms like the one in sample screenshot the "correct" way.
I would like to preserve following important things:
One should be able to quickly / easily add, remove or move the form's controls while maintaining the overall look and feel of the form - our web forms tend to change / grow over time as customers' requirements change.
The form should not crumple together when the user reduces the width of the browser window - the form width should not descend under some minimal value.
I am considering using html tables, but for example for the Address-Block on the sample screenshot I would have to have a table with 9 columns (one for every vertical boundary) and use lots of colspans - not neccessarily the fastest way of designing the forms considering future changes. And I heard in 1999 or so that the html tables were obsolete.
I read I should use divs and css for pretty much everything but I am unclear in how to create a web form like the one on the sample screenshot without providing absolute positions and sizes some way or other.
Any hints will be greatly appreciated.
Thanks in advance
Best Regards
Erich Horak
I would divide up your three main sections into divs, then tackle each section individually. My main tool when approaching this is the Web Dev Toolbar. I use it to view markup and CSS of any form I locate online that I like the look of:
https://addons.mozilla.org/en-US/firefox/addon/web-developer/
(CSS -> View CSS and CSS -> View Style Information (hover mouse) are helpful drop down options)
Forms are created with CSS mainly through the use of label and input classes:
http://speckyboy.com/2011/05/24/css-form-templates-tools-services/
Your form looks difficult at first glance, but when you break it down it really isn't that hard to do. The link above has samples - simple like you mentioned - but simple or not, the CSS is the same.
I am developing a website with drupal 6, and using a 960 grid system based theme.
I want to create a dynamic thumbnail gallery with Views, and using this jquery effect:
http://www.queness.com/post/590/jquery-thumbnail-with-zooming-image-and-fading-caption-tutorial
I have some experience with views, but I am by not means an expert... I am facing two problems here:
How to make the views html output
conform to my 960 grid system theme
(that means that each object in the
views output should have a grid-x
class, at the very least)
How to adapt the views html output to
the DOM required by the jquery effect I want to use.
So what I want is basically more control over the output of Views. Right now I can only get html lists or tables. Is there anyway to use a more customized DOM and put some kind of placeholders for fields in it?
Thank you for reading
O.
You can define your own templates, that Views will use instead of its default ones.
In those template, you can use almost any kind of HTML markup that you possibily can imagine -- which means you'll be having a really great level of control over the output.
For more informations, you can start looking at this question and its answers : Drupal 6: How to quickly theme a view ?.
And a couple more links that might be useful :
Drupal 6 theme guide
Overriding themable output
Views help index
I'm implementing "news" section in asp.net website. There is a list of short versions of articles on one page and when you click one of the links it redirects you to a page with a full article. The problem is that the article's text on the second page will come from database but the articles may vary - some may have links, some may have an image or a set of images, may be differently formatted etc. The obvious solution that my friend have come up with is to keep the article in the database as html including all links, images, formatting, etc. Then it would be simply displayed on the second page. I feel this is not a good solution as if, for example, we decide to change the css class of some div inside this html (let's say it is used in all articles), we will have to find it and change in every single record of the articles table in our database. But on the other hand we have no idea how to do it differently. My question is: how do you usually handle something like this?
I personally don't like the idea of storing full html in the database. Here's an attempt at solving the problem.
Don't go for a potentially infinite number of layouts. Yes all articles may be different but if you stick to a few good layouts then you're going to save yourself a lot of hassle. These layouts can be stored as templates e.g ArticleWithImagesAtTheBottom, ArticleWithImagesOnLeft etc
This way, your headache is less as you can easily change the templates. I guess you could also argue then that the site has some consistency in layout.
Then for storage you have at least 2 options:
Use the model-per-view approach and have eg ArticleWithImagesAtTheBottomModel which would have properties like 1stparagraph, 2ndparagraph, MainImage, ExtraImages
Parse the article according to the template you want to use. e.g look for a paragraph break if you need to.
Always keep the images separate and reference them in another column/table in the db. That gives you most freedom.
By the way, option #2 would be slower as you'd have to parse on the fly each time. I like the model-per-view approach.
Essentially I guess I'm trying to say beware of making things to complicated. An infinite number of layout means an infinite number of potential problems. You can always add more templates as you go if you really want to expand, but you're probably best off starting with say 3 or 4 layouts.
EDITED FROM THIS POINT:
Actually, thinking about it this may not be the best solution. It could work depending on your needs, but I was wondering how the big sites do it. If you really need that much flexibility, you could (as I think was sort of suggested) use a custom markup. Maybe even a simplified or full wiki markup. I'd still tend toward using templates in general, but if you need to insert at least links and images then you can parse for those.
Surely the point of storing HTML with logically placed < div >s is that you DON'T have to go through every bit of HTML you store to make changes to styles?
I presume you're not using inline styles in your stored HTML, and are referencing an external CSS file, right?
The objection you raise to your colleague's proposal does not say anything about the use of a DB. A DB as opposed to what: files? Then it's all the same. You want to screw around with the HTML, you have to do it on "every single record." Which is not any harder than "on every single file." Global changes are a bitch unless you plan for it by, say, referencing an external CSS. But if you're going to have millions of news articles, you had better plan on versioning the CSS as well.
Anyway, the CMSes do what you're thinking of doing. Using a DB is a fine way to go. How to use it would depend on knowing the problem more intimately.
Have you looked into using free content management systems? I can think of a few good ones:
Joomla
Drupal
WordPress
TONS of others... just do some googling.
Check out this Wiki article: http://en.wikipedia.org/wiki/List_of_content_management_systems