PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



question about css layout

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> Web Design
View previous topic :: View next topic  
Author Message
sudhakararaog



Joined: 19 Sep 2007
Posts: 82

PostPosted: Wed Nov 25, 2009 12:01 pm    Post subject: question about css layout Reply with quote

hi

at my workplace they have asked me to create a simple html page which will be used as a small widget in a website. as per the requirement in the html file. i should not use an external stylesheet and also no embedded style however i should write the page completely using inline css. all this is fine.


however my question and issue i am facing is with adjusting height as the content increasing when i give for example margin or padding.

please check out this link where i have created an image of what i am creating as html page using inline css.
http://www.sudhakargolakaram.co.in/form.html

as per the image there is an outer div which has the light blue background color which i have created like a container div with the background color

the dark blue rectangles are 3 images and the white color on the right with the rounded rectangle at the top and bottom is where content like header tag, img tag, forms etc will be used.

lets say for example i divide the images and content as 2 divs floating left with images div as 100px and content on the right as 300px width so a total of 400px and a total height of 300px

based on the design that i have the total width is 400px (left div with images=100px and right div with content=400px) and total height is 300px for example.

i am ok with the left div as the images have a fixed width and height, the problem i am facing with is the content div.


as the content div contains header tags, a small paragraph information within p tag, a small form with about 2 to 3 form fields, in order to add all these elements as per the design i am using padding top, padding bottom and if needed margin top and margin bottom. so due to this the content may go beyond the bottom div which has the rounded rectangle at the bottom, and this is not how it should appear the entire content should sit inside the 300px height in the right div

so do i have to keep subtracting the amount of padding and margin i am using from the height value of the right div so that the content sits inside within the total 300px height.

how do i go about this height aspect which i am having issue with and also is there something specific that i have to keep in mind for ie6 browser.


for the left and right div do i have to use

#left{
float: left;
width: 100px;
height: auto;
}

#right{
float: left;
width: 300px;
height: auto;
}

or do i have to specify the fixed height which is 300px for #left and #right divs

also in the #right div i am using 3 inner divs
1 for top rounded rectangle background = { background: url(topbg.jpg no-repeat; width:300px; height: 10px; }

2nd div with white background color no background image= do i have to specify a fixed height for this 2nd div = { width:300px; height: ; }

3rd for bottom rounded rectangle background image = { background: url(bottombg.jpg no-repeat; width:300px; height: 10px; }



any help will be greatly appreciated.

thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



Post new topic   Reply to topic    WeberForums.com Forum Index -> Web Design All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum






Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum