Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
margin or image size?
Old 06-17-2010, 10:22 AM margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Hi all,

I wanna know that what will be better to move the contents of the Gallery Section here (I wanna centralize the contents). Whether to use the css margins or resizing the image but here only img would be effected, not the caption.

Abdullah
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam

Last edited by asmalik12; 06-17-2010 at 10:23 AM..
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
 
Register now for full access!
Old 06-17-2010, 10:31 AM Re: margin or image size?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
I would apply padding the the div that contains the content and reduce the image size.

After firebugging it, 15px looks like a nice padding.

So as an example,

Reduce the image by atleast 30px width.
Apply a padding value of 15px to the div (the one imidiatly after <div id="col2split">)
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-17-2010, 10:51 AM Re: margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
It has done the it, but not from both sides? Should I reduce the image size more?
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 06-17-2010, 10:57 AM Re: margin or image size?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Yes, you want the image at 260px width.

Your box is 290px wide, you are using 15px padding so take 30px (left padding at 15px and right padding at 15px totaling 30px) off of your image in total.
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-18-2010, 08:51 AM Re: margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Why the <div> in search box is not ending just after the "submit" button?
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 06-18-2010, 09:17 AM Re: margin or image size?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
The wrapping div "headerright2" is set to 234px width. It is causing the seach div to stretch the whole width rather than the div only wrapping the form.

Try giving the div wrapping the form tags a width of 221px.
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-18-2010, 09:28 AM Re: margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
I have modified it but the problem still persists. Should I add right margin in headerright2?
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam

Last edited by asmalik12; 06-18-2010 at 09:35 AM..
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 06-18-2010, 09:46 AM Re: margin or image size?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Please upload the changes, im not seeing the width in the code.
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-18-2010, 09:54 AM Re: margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
Code:
.headerright2 {
	width: 225px;
	float: right;
	margin: 6px 0px 0px 0px;
	padding: 0px 0px 0px 0px;
	font-weight: bold;
	}
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 06-18-2010, 10:04 AM Re: margin or image size?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Try using:

Code:
.headerright2 {
        width: 221px;
	float: right;
	margin: 6px 0px 0px 0px;
	padding: 0px 0px 0px 0px;
	font-weight: bold;
If that still dosnt work for you then give .headerright2 a right margin of 5 to 10 pixels.
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-18-2010, 10:22 AM Re: margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
I have done it using a right margin

.headerright2 {
width: 225px;
float: right;
margin: 6px 3px 0px 0px;
padding: 0px 0px 0px 0px;
font-weight: bold;
}
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 06-18-2010, 10:23 AM Re: margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
It's ok now.

Now I have to add <div> in "Have you read" section in such a way that both of the stories come in a single <div>

Here is a php code, where I wanna add the <div>

PHP Code:
<?php $my_query = new WP_Query('showposts=1&offset=1'); ?>

<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

<?php if ( get_post_meta($post->ID'Image'true) ) { ?> 

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID"Image"true); ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?> <?php _e('thumbnail'); ?>" align="top" border="0" style="padding: 0px; margin: 10px 0px 0px 0px;width: 203px; height: 110px;"/></a>

<?php } else { ?>

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/default.gif" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" align="top" border="0" style="padding: 0px; margin: 10px 0px 0px 0px;width: 203px; height: 110px;"/></a>

<?php ?>

<h1 class="splititem"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>

<?php the_content_limit(110""); ?>

<?php endwhile; ?>

</div>

<div class="col1split_right">

<?php $my_query = new WP_Query('showposts=1&offset=2'); ?>

<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

<?php if ( get_post_meta($post->ID'Image'true) ) { ?> 

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID"Image"true); ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?> <?php _e('thumbnail'); ?>" align="top" border="0" style="padding: 0px; margin: 10px 0px 0px 0px;width: 203px; height: 110px;"/></a>

<?php } else { ?>

<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/default.gif" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" align="top" border="0" style="padding: 0px; margin: 10px 0px 0px 0px;width: 203px; height: 110px;"/></a>

<?php ?>

<h1 class="splititem"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1>

<?php the_content_limit(110""); ?>

<?php endwhile; ?>
and here is the <div> code which I wanna add:

Code:
<div style="background: #FFFFFF;
            border: 1px solid #C8C8C8;
            -moz-border-radius: 0 0 10px 10px;
            -webkit-border-radius: 0 0 10px 10px;
            -khtml-border-radius: 0 0 10px 10px;
            border-radius: 0 0 10px 10px;
            -moz-box-shadow: 2px 2px 15px #464646;
            -webkit-box-shadow: 2px 2px 15px #464646;
            -khtml-box-shadow: 2px 2px 15px #464646;
            box-shadow: 2px 2px 15px #464646;  
            padding: 0px 15px 0px 15px;">
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 06-18-2010, 10:42 AM Re: margin or image size?
Phunk Rabbit's Avatar
Ultra Talker

Posts: 255
Name: John Nerush
Location: Milton Keynes, UK
Trades: 0
Its hard to tell whats going on with your code there.

From what I can see on your site, "<div class="col1split_left">" contains the two articles, so if anything you want to apply those styles to this div or wrap a new one around it.

On a side note, you shouldnt be using <h1>'s for general headings, tecnically speaking you should only use one <h1> per page then use <h2>,<h3> etc respectivly.
__________________

Please login or register to view this content. Registration is FREE

Learn professional skills from professional people, from $6.50 a month.
Phunk Rabbit is offline
Reply With Quote
View Public Profile Visit Phunk Rabbit's homepage!
 
Old 06-18-2010, 10:55 AM Re: margin or image size?
asmalik12's Avatar
Extreme Talker

Posts: 173
Name: Abdullah Saleem
Trades: 0
There are two col1split_left and I wanna combine both of them. Should I add the <div> code under col1split_left in style.css file?

I guess, I am only using one <h1> which is the title of mainstory.
__________________
"Think 100 times before you take a decision, But once that decision is taken, stand by it as one man." - Quaid-e-Azam
asmalik12 is offline
Reply With Quote
View Public Profile Visit asmalik12's homepage!
 
Old 06-21-2010, 01:27 PM Re: margin or image size?
Junior Talker

Posts: 1
Name: adam
Trades: 0
be careful with your use of margins and paddings is all I can say, it makes it for a rather annoying time when cross browser optimizing for IE6.
__________________
Adam

Please login or register to view this content. Registration is FREE
JOer1499 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to margin or image size?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.56728 seconds with 12 queries