Skip to main content

Absolute Positioning Inside Relative Positioning

For Website Designing and Development
Web designer Hyderabad
eMail : varadesigns@yahoo.com
phone : +91 9676739333

A page element with relative positioning gives you the control to absolutely position children elements inside of it.

To some, this is obvious. To others, this may be one of those CSS “Ah-ha!” Moments. I remember it being a big deal for me when I first “got it”.

Here is a visual:



The relative positioning on the parent is the big deal here. Look what would happen if you forgot that:



Might not look like a big deal in this small example, but it really is a significant change. What is happening is the absolutely positioned elements are positioning themselves in relation to the body element instead of their direct parent. So if the browser window grows, that one in the bottom left is going to stick with the browser window, not hang back inside like his well behaved brother from the first image.

Once you “wrap” your head around this concept (rim-shot) you will find little uses for it all over the place, and start noticing examples of other places using it. It’s like when you learn a new word and then you start hearing it everywhere. Yeah.

Source : http://css-tricks.com/absolute-positioning-inside-relative-positioning/

Popular posts from this blog

Photo Optimization

Photo Optimization is necessary to allow a web page to load in the shortest amount of time possible. Fast loading time require small files. This article discusses the methods used for photo optimization. In an ideal world, a web designer could use the highest quality photos and have the webpage download lightening fast. Fast loading requires small file sizes for pictures. Unfortunately, there is a trade off between picture quality and file size. Web surfers are a notoriously impatient bunch. If a website takes too long to load, they will just click away and never come back. Computer monitors can only display images at 72dpi (dots per inch). So the first step in photo optimization is to reduce the resolution to 72 dpi. Large picture can be sliced up into smaller ones and the put back together on the web page. Each piece will be a very small file and together will load in a fraction of the time a single image file would load. Most graphic files contain information about the color palette...

Mobile Web Design: Tips and Best Practices

Mobile Web Design Trends For 2009 Web designers know that the industry involves plenty of change, and continuous adaption and development of skills is required in order to stay up to date. In the past few years, one of the biggest areas of change has been the amount of Internet users who are accessing websites via phones and mobile devices. As a result, Web designers have a growing need to be educated in this area and ready to design websites that accommodate this audience. Because designing websites for mobile devices brings some unique situations and challenges into play, the subject requires a strategic approach from the designer and developer. In this article, we’ll look at the subject as a whole, including current trends, challenges, tips and a showcase of mobile websites. Plenty of helpful resources and articles are also linked to throughout the post, so if you’re interested in learning more about designing for mobiles, you should have plenty of information at your fingertips. 1....

How to Make a Website Interactive

Technology has made businesses to run more conveniently. Now it is possible to get the response from the customers about a particular product or service at a greater speed. The reason is simple- A Faster Interaction. The customers and prospects want to speak what they like and what they expect from a particular brand. They have become more knowledgeable. They are not satisfied just by availing services given by the service provider. In turn they are looking for more. They want to be a part of your community and want to connect. They want to tell what they are feeling about a particular product or service. By making your website interactive you can help your customers and prospects to connect. You can boost interactivity in your website by using technology effectively. Let us see how: Ask people to comment on your blogs. This increases interactivity in your website. People would not take pain to comment on your blog unless they find something valuable, something interesting or something...