Current location: Hot Scripts Forums » General Web Coding » CSS » Alignment Issue


Alignment Issue

Reply
  #1 (permalink)  
Old 01-24-08, 04:55 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Alignment Issue

I'm trying to take the tables out of a page at the moment and when I do so it is moving things down the screen on me.

I wonder if anyone can help:

HTML Code:
<div class="wraparound">
    <a href="#top"></a>
    <form id="form1" runat="server">
        <div class="headerlogo"><a href="Home.aspx"><img src="graphics/graphicheader.jpg" height="51px" width="968px" alt="" border="0" title="" /></a> </div>
<!--        <table cellpadding="0" cellspacing="0" class="mainbody">
        
                        
            <tr>
                <td align="center"> !-->
            <div class="menutabs"><uc1:Fin1 ID="Fin1_1" runat="server" /></div>
            <!--    </td>    !-->        
                
                    <div class="blank-page"></div>
                            
                            <!-- </tr>
                            
                                                </table>
                </td>
            </tr>
        </table> !-->
    </form>
    </div>
The css is:

css Code:
  1. .blank-page
  2. {
  3.     background-image: url('graphics/hardhatsgrey.jpg');
  4.     background-repeat: no-repeat;
  5.     height: 550px;
  6.     width: 969px;
  7.     left: 100px;
  8.     top: 100px;
  9. }
  10.  
  11. .wraparound
  12. {
  13.     margin-top: 1px;
  14.     margin-bottom: 1px;
  15.     margin-left: 1px;
  16.     margin-right: 1px;
  17.  
  18. }
  19.  
  20. .headerlogo
  21. {
  22.     margin-top: 1px;
  23.     margin-left: auto;
  24.     margin-right: auto;
  25.     text-align: center;
  26. }

The image is getting moved to a new line past the menu on the left when should be just aligned to the right of it.
__________________
Placeholder, place signature here.

Last edited by Nico; 01-24-08 at 06:35 AM.
Reply With Quote
  #2 (permalink)  
Old 01-25-08, 06:57 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Good old position absolute sorted it out for me.
__________________
Placeholder, place signature here.
Reply With Quote
  #3 (permalink)  
Old 01-29-08, 03:59 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Nope gone again, I can't use position: absolute.

Right I need to build it like this

ASP Control in a black box and then a background image in the div next to it. They can't overlap, keeps putting the image on the next line and I don't need that.
__________________
Placeholder, place signature here.
Reply With Quote
  #4 (permalink)  
Old 01-29-08, 04:52 AM
Vicious's Avatar
Vicious Vicious is offline
Community VIP
 
Join Date: Jan 2007
Location: Belgium
Posts: 584
Thanks: 0
Thanked 0 Times in 0 Posts
for both divs (the one with the ASP control, and the one with te background image), try specifying "float:left;".

If you're not used to working with floating elements, you might have some issues with your layout. Just ask them, I can help you with that
__________________
Jack Bauer makes Chuck Norris cry
Reply With Quote
  #5 (permalink)  
Old 01-29-08, 05:54 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Apparently float:left is not recoginsed and so it won't compile. I'm putting it in the div tag should I be doing it in the css?
__________________
Placeholder, place signature here.
Reply With Quote
  #6 (permalink)  
Old 01-29-08, 05:58 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Wait, am I stupid or just lost the plot completely? I need to go book shopping.
/me looks at the 5 books already on his desk!
__________________
Placeholder, place signature here.
Reply With Quote
  #7 (permalink)  
Old 01-29-08, 06:19 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Gah! Now my footer won't align to the bottom of the page anymore! I hate CSS!
__________________
Placeholder, place signature here.
Reply With Quote
  #8 (permalink)  
Old 01-29-08, 06:31 AM
Vicious's Avatar
Vicious Vicious is offline
Community VIP
 
Join Date: Jan 2007
Location: Belgium
Posts: 584
Thanks: 0
Thanked 0 Times in 0 Posts
lol yeah, the float:left; was for in the CSS. Problem is that the rest of your page may be a bit screwed. You have to solve that by telling the first element after the floating ones that they have to stop behaving badly

Example:

html Code:
    <div style="float:left;width:100px;">foo</div><div style="float:left;width:50px;">bar</div><div style="float:none;clear:both;"></div>

That last div stops the floating, and controls the flow again.
More info on clear
__________________
Jack Bauer makes Chuck Norris cry
Reply With Quote
  #9 (permalink)  
Old 01-29-08, 08:24 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
I can't belive how much I've forgotten over these years.

Picking it up slowly, got loads of text books to read!

Thanks so much!
__________________
Placeholder, place signature here.
Reply With Quote
  #10 (permalink)  
Old 01-30-08, 03:43 AM
Rapid Dr3am Rapid Dr3am is offline
Community VIP
 
Join Date: Jan 2004
Location: Liverpool, England
Posts: 752
Thanks: 0
Thanked 0 Times in 0 Posts
Argh now I've lost it again.

I've got another page same ASP control down the left my entry fields across the right in a box.

Set them as floating with some clear:both but still the right shows fine but the asp control is not "floating" over it. Garh!
__________________
Placeholder, place signature here.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
alignment issue vbsaltydog CSS 5 11-21-06 10:29 AM
Interesting DataGrid Issue LittlBUGer ASP.NET 11 10-16-06 10:39 AM
Odd Z-Indexing Issue im running to with IE nova912 CSS 1 09-16-06 03:21 PM
Issue Tracking and Task management SlackeR Script Requests 8 10-05-05 04:29 PM
Language issue in from property, Please Help AskAR ASP 0 08-10-05 06:40 AM


All times are GMT -5. The time now is 02:05 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.