| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
tech house dj
Join Date: May 2008
Location: riyadh, saudi arabia
Posts: 30
|
hello i have a problem positioning a link in a header: the following screens will illustrate what i mean: what i want to achieve: ![]() what i have so far: ![]() so basically i want to align the link so its a little higher. the site is designed using a combination of table layout and css - as its a closed-access service delivery portal, compatibility is critical heres the page markup: Code:
here's the css: Code:
|
|
|
|
|
|
#2 (permalink) |
|
Semantics, yay.
Join Date: Nov 2005
Location: Salem, Massachusetts
Posts: 1,036
|
The easiest way to do it would involve the use of the position property. Change your CSS to this: HTML Code:
|
|
|
|
#3 (permalink) |
|
tech house dj
Join Date: May 2008
Location: riyadh, saudi arabia
Posts: 30
|
that worked fine - thanks but i'm trying to avoid such absolute positioning as that link is for language switching to arabic, which is right-to-left, so the whole interface will be mirrored. is there no way to define: div.header a align: left vertical align: center so that way in the arabic stylesheet i can change align: left to align: right that's what i was trying to achieve with float and margin, but that didnt work |
|
|
|
#6 (permalink) | ||
|
tech house dj
Join Date: May 2008
Location: riyadh, saudi arabia
Posts: 30
|
Quote:
vertical position will stay the same - the site will just be mirrored horizontally. i used this and it works fine for now: HTML Code:
Quote:
...how will this help? both the logo and anchor are block-level elements, right? why should i enclose them in spans? |
||
|
|
|
#7 (permalink) |
|
Registered User
Join Date: May 2008
Posts: 3
|
img and anchor tags are defenitely inline elements; not block level. Block-level elements Headings, paragraphs, lists, or tables are "large" structures containing other blocks, inline elements, or text (but see nesting rules, below). They are usually displayed as independent "blocks" separated from other blocks by vertical space (margins). Inline or text-level elements Hyperlinks, citations, quotations, or images are "small" structures that represent or describe small pieces of text or data. They may contain only text or other inline elements, and are usually displayed one after another on a line within the block that contains them. |
|
|
|
#9 (permalink) | |
|
tech house dj
Join Date: May 2008
Location: riyadh, saudi arabia
Posts: 30
|
Quote:
of course. but instead of nesting <span>'s, won't display: block; do the same thing? |
|
|
|
|
#10 (permalink) |
|
Moderator
Join Date: Jan 2005
Location: Brooklyn, NYC
Posts: 11,869
|
Sorta. If you do what Sri is suggesting (wrapping spans) they'll still be inline. If you do display block, they will be block elements - if that's what you want. Interesting problem you've got there (the ltr and rtl problem). Find good advice in the beginners web design thread.
patrick o'neill web developer | blog | spam humor |
|
|
|
#12 (permalink) | |
|
Moderator
Join Date: Jan 2005
Location: Brooklyn, NYC
Posts: 11,869
|
Quote:
Find good advice in the beginners web design thread.
patrick o'neill web developer | blog | spam humor |
|
|
![]() |