Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 10:23 PM
J
Guest
 
Posts: n/a
Default alignment questions

I've defined an area where I want a logo, and some text displayed
underneath the logo.
See code below. Questions:
1. How can I code in the style section that I want the img aligned 'right'.
(Instead of setting this in the body)?
2. How can I code in the style section that I want the <p> info aligned
'center'?
3. The general question is, what reference can I use to find what all the
possible properties are available (i.e. can I set an 'align: right' in the
'onepieceheader p' section)?


<style type=text/css>
#onepieceheader {
position: absolute;
top: 0;
left: 60;
height: 127px;
width: 600px;
}
#onepieceheader p {
font-weight: bold;
}
</STYLE></head>

<body>
<div id="onepieceheader">
<img align="right" src="companylogo.gif">
<p>we make it right</p>
</div>



  #2  
Old July 20th, 2005, 10:23 PM
Lauri Raittila
Guest
 
Posts: n/a
Default Re: alignment questions

In article J wrote:[color=blue]
> I've defined an area where I want a logo, and some text displayed
> underneath the logo.
> See code below. Questions:
> 1. How can I code in the style section that I want the img aligned 'right'.
> (Instead of setting this in the body)?[/color]

img {float:right;}
[color=blue]
> 2. How can I code in the style section that I want the <p> info aligned
> 'center'?[/color]

p {text-align:center;}

If you want it to align in the center of space left, add:

p {padding-right:<imgwidth>px}

elsif you want that P below image add:

p {clear:left}

[color=blue]
> 3. The general question is, what reference can I use to find what all the
> possible properties are available (i.e. can I set an 'align: right' in the
> 'onepieceheader p' section)?[/color]

http://www.w3.org/TR/CSS1
http://www.w3.org/TR/CSS2/
http://www.w3.org/TR/CSS21/
[color=blue]
> <style type=text/css>
> #onepieceheader {
> position: absolute;
> top: 0;
> left: 60;
> height: 127px;
> width: 600px;
> }
> #onepieceheader p {
> font-weight: bold;
> }
> </STYLE></head>
>
> <body>
> <div id="onepieceheader">
> <img align="right" src="companylogo.gif">
> <p>we make it right</p>
> </div>[/color]

Are you sure this is paragraph, and not heading? It sure looks like
heading. Why not:
[color=blue]
> <style type=text/css>
> div.header {[/color]
margin-top:0;
margin-left: 60;
height: 127px;
width: 600px; /* this is not good, use max-width instead*/
font-weight: bold;
font-size:100%;[color=blue]
> }
> </style></head>[/color]
[color=blue]
> <body>[/color]
<div class="header"><img src="companylogo.gif"><h1>we make it right</h1>
</div>


--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

 

Bookmarks

Thread Tools

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

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles